aboutsummaryrefslogtreecommitdiff
path: root/test/unit/eval/helpers.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-12-24 02:11:46 +0300
committerZyX <kp-pav@yandex.ru>2017-12-24 14:09:36 +0300
commit608c3d7baf2745b188bc42f9f45ad1bb188a4828 (patch)
treedb4cd569824b9971a9831264571a0f9d16bf75d5 /test/unit/eval/helpers.lua
parent6bf3dc77c484f757d37c22694e1278abc014278f (diff)
downloadrneovim-608c3d7baf2745b188bc42f9f45ad1bb188a4828.tar.gz
rneovim-608c3d7baf2745b188bc42f9f45ad1bb188a4828.tar.bz2
rneovim-608c3d7baf2745b188bc42f9f45ad1bb188a4828.zip
eval/typval: Remove tv_list_item_free() as it is unused
Diffstat (limited to 'test/unit/eval/helpers.lua')
-rw-r--r--test/unit/eval/helpers.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua
index 1a3210e1fd..6babd4be77 100644
--- a/test/unit/eval/helpers.lua
+++ b/test/unit/eval/helpers.lua
@@ -28,8 +28,13 @@ local function tv_list_item_alloc()
return ffi.cast('listitem_T*', eval.xmalloc(ffi.sizeof('listitem_T')))
end
+local function tv_list_item_free(li)
+ eval.tv_clear(li.li_tv)
+ eval.xfree(li)
+end
+
local function li_alloc(nogc)
- local gcfunc = eval.tv_list_item_free
+ local gcfunc = tv_list_item_free
if nogc then gcfunc = nil end
local li = ffi.gc(tv_list_item_alloc(), gcfunc)
li.li_next = nil
@@ -537,6 +542,7 @@ return {
typvalt=typvalt,
li_alloc=li_alloc,
+ tv_list_item_free=tv_list_item_free,
dict_iter=dict_iter,
list_iter=list_iter,