mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 15:38:33 +00:00
vim-patch:7.4.1559
Problem: Passing cookie to a callback is clumsy.
Solution: Change function() to take arguments and return a partial.
1735bc988c
This commit is contained in:

committed by
James McCoy

parent
75c18b6aaa
commit
521e45f2a8
@@ -69,6 +69,11 @@
|
||||
///
|
||||
/// @param fun Function name.
|
||||
|
||||
/// @def TYPVAL_ENCODE_CONV_PARTIAL
|
||||
/// @brief Macros used to convert a partial
|
||||
///
|
||||
/// @param partial Partial name.
|
||||
|
||||
/// @def TYPVAL_ENCODE_CONV_EMPTY_LIST
|
||||
/// @brief Macros used to convert an empty list
|
||||
///
|
||||
@@ -248,6 +253,10 @@ static int name##_convert_one_value(firstargtype firstargname, \
|
||||
TYPVAL_ENCODE_CONV_FUNC(tv->vval.v_string); \
|
||||
break; \
|
||||
} \
|
||||
case VAR_PARTIAL: { \
|
||||
TYPVAL_ENCODE_CONV_PARTIAL(tv->vval.v_partial); \
|
||||
break; \
|
||||
} \
|
||||
case VAR_LIST: { \
|
||||
if (tv->vval.v_list == NULL || tv->vval.v_list->lv_len == 0) { \
|
||||
TYPVAL_ENCODE_CONV_EMPTY_LIST(); \
|
||||
|
Reference in New Issue
Block a user