#include <assert.h>
#include <inttypes.h>
#include <stddef.h>
#include <string.h>
#include "nvim/eval/typval.h"
#include "nvim/func_attr.h"
#include "nvim/lib/kvec.h"
Go to the source code of this file.
Data Structures | |
struct | MPConvStackVal |
Structure representing current VimL to messagepack conversion state. More... | |
Enumerations | |
enum | MPConvStackValType { kMPConvDict, kMPConvList, kMPConvPairs, kMPConvPartial, kMPConvPartialList } |
Type of the stack entry. More... | |
enum | MPConvPartialStage { kMPConvPartialArgs, kMPConvPartialSelf, kMPConvPartialEnd } |
Stage at which partial is being converted. More... | |
Functions | |
typedef | kvec_withinit_t (MPConvStackVal, 8) MPConvStack |
Stack used to convert VimL values to messagepack. More... | |
Contains common definitions for eval/typval_encode.c.h. Most of time should not be included directly.
#define _mp_destroy kvi_destroy |
#define _mp_init kvi_init |
#define _mp_last kv_last |
#define _mp_pop kv_pop |
#define _mp_push kvi_push |
#define _mp_size kv_size |
#define _TYPVAL_ENCODE_CHECK_SELF_REFERENCE _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _check_self_reference) |
Self reference checker function name.
#define _TYPVAL_ENCODE_CONVERT_ONE_VALUE _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _convert_one_value) |
Name of the …convert_one_value function.
#define _TYPVAL_ENCODE_DO_CHECK_SELF_REFERENCE | ( | val, | |
copyID_attr, | |||
copyID, | |||
conv_type | |||
) |
Code for checking whether container references itself
[in,out] | val | Container to check. |
copyID_attr | Name of the container attribute that holds copyID. After checking whether value of this attribute is copyID (variable) it is set to copyID. | |
[in] | copyID | CopyID used by the caller. |
conv_type | Type of the conversion, |
#define _TYPVAL_ENCODE_ENCODE _TYPVAL_ENCODE_FUNC_NAME(encode_vim_to_, ) |
Entry point function name.
#define _TYPVAL_ENCODE_FUNC_NAME | ( | pref, | |
suf | |||
) | _TYPVAL_ENCODE_FUNC_NAME_INNER(pref, TYPVAL_ENCODE_NAME, suf) |
Construct function name, possibly using macros
Is used to expand macros that may appear in arguments.
[in] | pref | Prefix. |
[in] | suf | Suffix. |
#define _TYPVAL_ENCODE_FUNC_NAME_INNER | ( | pref, | |
name, | |||
suf | |||
) | _TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf) |
#define TYPVAL_ENCODE_NODICT_VAR _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var) |
Name of the dummy const dict_T *const variable.
enum MPConvPartialStage |
enum MPConvStackValType |
Type of the stack entry.
Enumerator | |
---|---|
kMPConvDict | Convert dict_T *dictionary. |
kMPConvList | Convert list_T *list. |
kMPConvPairs | Convert mapping represented as a list_T* of pairs. |
kMPConvPartial | Convert partial_T* partial. |
kMPConvPartialList | Convert argc/argv pair coming from a partial. |
typedef kvec_withinit_t | ( | MPConvStackVal | , |
8 | |||
) |
Stack used to convert VimL values to messagepack.