diff options
author | James McCoy <jamessan@jamessan.com> | 2016-12-12 10:53:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 10:53:32 -0500 |
commit | 988ab5804a16beafff26b487b0612cb7cf97ea09 (patch) | |
tree | e31b25acaf30023616d4f469af5d067befd30556 /src/nvim/api/private/helpers.c | |
parent | 75c18b6aaa8430596fa10466dc7918047b13ff2b (diff) | |
parent | 5e4eb18eb0242794c0b3a622f7acf0d3e6856c05 (diff) | |
download | rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.tar.gz rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.tar.bz2 rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.zip |
Merge pull request #5529 from brcolow/vim-7.4.1559
Port partial patches from vim
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 72db7c0782..b004cfc7a1 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 @@ -653,7 +657,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err) if (!object_to_vim(item, &li->li_tv, err)) { // cleanup listitem_free(li); - list_free(list, true); + list_free(list); return false; } @@ -677,7 +681,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err) api_set_error(err, Validation, _("Empty dictionary keys aren't allowed")); // cleanup - dict_free(dict, true); + dict_free(dict); return false; } @@ -686,7 +690,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err) if (!object_to_vim(item.value, &di->di_tv, err)) { // cleanup dictitem_free(di); - dict_free(dict, true); + dict_free(dict); return false; } |