aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.c
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-10-24 23:53:07 -0700
committerJames McCoy <jamessan@jamessan.com>2016-12-12 10:17:34 -0500
commit521e45f2a8c0619335288accdda0f0aaa1fc6513 (patch)
treec9f188f26ae7738a2dc2e71e3c816cdf62d5c151 /src/nvim/api/private/helpers.c
parent75c18b6aaa8430596fa10466dc7918047b13ff2b (diff)
downloadrneovim-521e45f2a8c0619335288accdda0f0aaa1fc6513.tar.gz
rneovim-521e45f2a8c0619335288accdda0f0aaa1fc6513.tar.bz2
rneovim-521e45f2a8c0619335288accdda0f0aaa1fc6513.zip
vim-patch:7.4.1559
Problem: Passing cookie to a callback is clumsy. Solution: Change function() to take arguments and return a partial. https://github.com/vim/vim/commit/1735bc988c546cc962c5f94792815b4d7cb79710
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r--src/nvim/api/private/helpers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index 72db7c0782..0acdff3232 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -360,6 +360,9 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
#define TYPVAL_ENCODE_CONV_FUNC(fun) \
TYPVAL_ENCODE_CONV_NIL()
+#define TYPVAL_ENCODE_CONV_PARTIAL(partial) \
+ TYPVAL_ENCODE_CONV_NIL()
+
#define TYPVAL_ENCODE_CONV_EMPTY_LIST() \
kv_push(edata->stack, ARRAY_OBJ(((Array) { .capacity = 0, .size = 0 })))
@@ -482,6 +485,7 @@ TYPVAL_ENCODE_DEFINE_CONV_FUNCTIONS(static, object, EncodedData *const, edata)
#undef TYPVAL_ENCODE_CONV_NUMBER
#undef TYPVAL_ENCODE_CONV_FLOAT
#undef TYPVAL_ENCODE_CONV_FUNC
+#undef TYPVAL_ENCODE_CONV_PARTIAL
#undef TYPVAL_ENCODE_CONV_EMPTY_LIST
#undef TYPVAL_ENCODE_CONV_LIST_START
#undef TYPVAL_ENCODE_CONV_EMPTY_DICT