diff options
author | ZyX <kp-pav@yandex.ru> | 2016-08-20 22:24:34 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-03-29 10:07:42 +0300 |
commit | e18a5783080f7c94f408ec5f53dedffdb69789e1 (patch) | |
tree | 17f54dfabb1163f2defce7989b3a182b846334f9 /test/unit/eval/helpers.lua | |
parent | 50a48f2a0ecf7f767df961f7f5060505cf28e331 (diff) | |
download | rneovim-e18a5783080f7c94f408ec5f53dedffdb69789e1.tar.gz rneovim-e18a5783080f7c94f408ec5f53dedffdb69789e1.tar.bz2 rneovim-e18a5783080f7c94f408ec5f53dedffdb69789e1.zip |
*: Move some dictionary functions to typval.h and use char*
Also fixes buffer reusage in setmatches() and complete().
Diffstat (limited to 'test/unit/eval/helpers.lua')
-rw-r--r-- | test/unit/eval/helpers.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index 49f929937f..be77ef4c83 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -272,17 +272,17 @@ local lua2typvalt_type_tab = { processed[l].dv_refcount = processed[l].dv_refcount + 1 return typvalt(eval.VAR_DICT, {v_dict=processed[l]}) end - local dct = eval.dict_alloc() + local dct = eval.tv_dict_alloc() dct.dv_refcount = 1 processed[l] = dct local ret = typvalt(eval.VAR_DICT, {v_dict=dct}) for k, v in pairs(l) do if type(k) == 'string' then - local di = eval.dictitem_alloc(to_cstr(k)) + local di = eval.tv_dict_item_alloc(to_cstr(k)) local val_tv = ffi.gc(lua2typvalt(v, processed), nil) eval.copy_tv(val_tv, di.di_tv) eval.tv_clear(val_tv) - eval.dict_add(dct, di) + eval.tv_dict_add(dct, di) end end return ret |