aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/private/helpers.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-01-07 15:15:14 +0300
committerZyX <kp-pav@yandex.ru>2017-01-07 15:15:14 +0300
commita970c1a95785cce9176274ffd4b783c79372afed (patch)
tree2757e6ef9e6a26636166a0032177c8c45bf3ad40 /src/nvim/api/private/helpers.c
parent7d0a892b374a8e5e025905a28e54b98b4f62f533 (diff)
downloadrneovim-a970c1a95785cce9176274ffd4b783c79372afed.tar.gz
rneovim-a970c1a95785cce9176274ffd4b783c79372afed.tar.bz2
rneovim-a970c1a95785cce9176274ffd4b783c79372afed.zip
eval: Make sure that copyID is reset when needed
Works by making value pushed on stack represent the exhausted list. Fixes #5901, except for dictionaries which need similar adjustment.
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r--src/nvim/api/private/helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index 701a1cbf2b..4eff21bc26 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -387,6 +387,8 @@ static inline void typval_encode_list_start(EncodedData *const edata,
#define TYPVAL_ENCODE_CONV_LIST_START(tv, len) \
typval_encode_list_start(edata, (size_t)(len))
+#define TYPVAL_ENCODE_CONV_REAL_LIST_AFTER_START(tv, mpsv)
+
static inline void typval_encode_between_list_items(EncodedData *const edata)
FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL
{
@@ -499,6 +501,7 @@ static inline void typval_encode_dict_end(EncodedData *const edata)
#undef TYPVAL_ENCODE_CONV_FUNC_END
#undef TYPVAL_ENCODE_CONV_EMPTY_LIST
#undef TYPVAL_ENCODE_CONV_LIST_START
+#undef TYPVAL_ENCODE_CONV_REAL_LIST_AFTER_START
#undef TYPVAL_ENCODE_CONV_EMPTY_DICT
#undef TYPVAL_ENCODE_CONV_NIL
#undef TYPVAL_ENCODE_CONV_BOOL