Functions | Variables
typval_encode.c.h File Reference
#include <stddef.h>
#include <inttypes.h>
#include <assert.h>
#include "nvim/lib/kvec.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/encode.h"
#include "nvim/func_attr.h"
#include "nvim/eval/typval_encode.h"

Go to the source code of this file.

Functions

TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE (TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME, typval_T *const tv, const char *const objname) REAL_FATTR_NONNULL_ARG(2
 

Variables

const dict_T *const TYPVAL_ENCODE_NODICT_VAR = NULL
 
static int REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_ALWAYS_INLINE
 
static int REAL_FATTR_WARN_UNUSED_RESULT
 

Detailed Description

Contains set of macros used to convert (possibly recursive) typval_T into something else. For these macros to work the following macros must be defined:

Function Documentation

TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE ( TYPVAL_ENCODE_FIRST_ARG_TYPE  TYPVAL_ENCODE_FIRST_ARG_NAME,
typval_T *const  top_tv,
const char *const  objname 
)

Convert the whole typval

Parameters
TYPVAL_ENCODE_FIRST_ARG_NAMEFirst argument, defined by the includer. Only meaningful to macros defined by the includer.
top_tvConverted value.
[in]objnameObject name, used for error reporting.
Returns
OK in case of success, FAIL in case of failure.

Label common for this and convert_one_value functions, used for escaping from macros like TYPVAL_ENCODE_CONV_DICT_START.

Variable Documentation

int REAL_FATTR_WARN_UNUSED_RESULT REAL_FATTR_ALWAYS_INLINE
TYPVAL_ENCODE_SCOPE int REAL_FATTR_WARN_UNUSED_RESULT
const dict_T* const TYPVAL_ENCODE_NODICT_VAR = NULL

Dummy variable used because some macros need lvalue

Must not be written to, if needed one must check that address of the macros argument is (not) equal to &TYPVAL_ENCODE_NODICT_VAR.