aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-01-03 22:51:29 +0300
committerZyX <kp-pav@yandex.ru>2017-01-03 22:51:29 +0300
commit136b382e64390bf3129a7cd127b7704c983ec300 (patch)
treee2d352e1236e6ecb82f6c70478ecd74056f1bc21 /src/nvim/api/private/helpers.c
parentefc624c2fe029a4ab494672c43366e8c57c19108 (diff)
downloadrneovim-136b382e64390bf3129a7cd127b7704c983ec300.tar.gz
rneovim-136b382e64390bf3129a7cd127b7704c983ec300.tar.bz2
rneovim-136b382e64390bf3129a7cd127b7704c983ec300.zip
tests: Add tests for partials dumping
Also fixed dumping of partials by encode_vim_to_object and added code which is able to work with partials and dictionaries to test/unit/eval/helpers.lua (mostly copied from #5119, except for partials handling).
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r--src/nvim/api/private/helpers.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index 5bd76bc238..de566e37ad 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -354,10 +354,13 @@ void set_option_to(void *to, int type, String name, Object value, Error *err)
#define TYPVAL_ENCODE_CONV_STR_STRING TYPVAL_ENCODE_CONV_STRING
#define TYPVAL_ENCODE_CONV_EXT_STRING(tv, str, len, type) \
- TYPVAL_ENCODE_CONV_NIL()
+ TYPVAL_ENCODE_CONV_NIL(tv)
#define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \
- TYPVAL_ENCODE_CONV_NIL()
+ do { \
+ TYPVAL_ENCODE_CONV_NIL(tv); \
+ goto typval_encode_stop_converting_one_item; \
+ } while (0)
#define TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS(tv, len)
#define TYPVAL_ENCODE_CONV_FUNC_BEFORE_SELF(tv, len)