eval/typval: Remove tv_list_item_free() as it is unused

This commit is contained in:
ZyX
2017-12-24 02:11:46 +03:00
parent 6bf3dc77c4
commit 608c3d7baf
3 changed files with 49 additions and 95 deletions

View File

@@ -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,