doc: eval/typval_encode.h

Annotate TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS to aid code navigation.
This commit is contained in:
Justin M. Keyes
2016-10-31 02:03:37 +01:00
parent ed198737fd
commit b172f9904f
4 changed files with 16 additions and 4 deletions

View File

@@ -212,10 +212,9 @@ static inline size_t tv_strlen(const typval_T *const tv)
: strlen((char *) tv->vval.v_string));
}
/// Define functions which convert VimL value to something else
///
/// Creates function `vim_to_{name}(firstargtype firstargname, typval_T *const
/// tv)` which returns OK or FAIL and helper functions.
/// Define functions to convert a VimL value:
/// `{name}_convert_one_value(...)`
/// `encode_vim_to_{name}(...)`
///
/// @param scope Scope of the main function: either nothing or `static`.
/// @param name Name of the target converter.
@@ -224,6 +223,7 @@ static inline size_t tv_strlen(const typval_T *const tv)
/// @param firstargname Name of the first argument.
#define TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS(scope, name, firstargtype, \
firstargname) \
/* Returns OK or FAIL */ \
static int name##_convert_one_value(firstargtype firstargname, \
MPConvStack *const mpstack, \
typval_T *const tv, \