Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/pi_msgpack.txt`
66b3479b36ddbbcb7ee4797b663e8c9474e264a5fff6fb0e0000000100000880

does not check whether argument matches its description.

*{msgpack-value}*	Either |msgpack-special-dict| or a regular value, but
			not function reference.
*{msgpack-integer}*	Any value for which |msgpack#type()| will return
			"integer".
*{msgpack-special-int}*	|msgpack-special-dict| representing integer.

msgpack#is_int({msgpack-value})				*msgpack#is_int()*
	Returns 1 if given {msgpack-value} is integer value, 0 otherwise.

msgpack#is_uint({msgpack-value})			*msgpack#is_uint()*
	Returns 1 if given {msgpack-value} is integer value greater or equal
	to zero, 0 otherwise.

							*msgpack#strftime*
msgpack#strftime({format}, {msgpack-integer})		*msgpack#strftime()*
	Same as |strftime()|, but second argument may be
	|msgpack-special-dict|.  Requires |Python| to really work with
	|msgpack-special-dict|s.

							*msgpack#strptime*
msgpack#strptime({format}, {time})			*msgpack#strptime()*
	Reverse of |msgpack#strftime()|: for any time and format
	|msgpack#equal|( |msgpack#strptime|(format, |msgpack#strftime|(format,
	time)), time) be true.  Requires ||Python|, without it only supports
	non-|msgpack-special-dict| nonnegative times and format equal to
	`%Y-%m-%dT%H:%M:%S`.

msgpack#int_dict_to_str({msgpack-special-int})	*msgpack#int_dict_to_str()*
	Function which converts |msgpack-special-dict| integer value to
	a hexadecimal value like 0x1234567890ABCDEF (always returns exactly 16
	hexadecimal digits).

msgpack#special_type({msgpack-value})		*msgpack#special_type()*
	Returns zero if {msgpack-value} is not |msgpack-special-dict|.  If it
	is it returns name of the key in |v:msgpack_types| which represents
	{msgpack-value} type.

msgpack#type({msgpack-value})				*msgpack#type()*
	Returns name of the key in |v:msgpack_types| that represents
	{msgpack-value} type.  Never returns zero: this function returns
	msgpack type which will be dumped by |msgpackdump()| should it receive
	a list with single {msgpack-value} as input.

msgpack#deepcopy({msgpack-value})			*msgpack#deepcopy()*
	Like |deepcopy()|, but works correctly with |msgpack-special-dict|
	values.  Plain |deepcopy()| will destroy all types in
	|msgpack-special-dict| values because it will

Title: Msgpack.vim Manual: Function Arguments and Utilities
Summary
This section details the functions available in the msgpack.vim plugin. It explains how to use functions to identify integer values, format and parse time, convert special dictionary integers to strings, and determine the type of a value. It also describes how to perform a deep copy that correctly handles msgpack-special-dict values, and includes caveats on argument checking.