diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-01-15 23:35:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-15 23:35:20 +0100 |
commit | de0a9548f7bf55bdf0202a2dcebb86a92f2d989d (patch) | |
tree | 47848ab49a0188ddce9d305a187ff638ccb2965b /test/unit/eval/helpers.lua | |
parent | 726197d8907891eda99299a2920b0d1d98148a3c (diff) | |
parent | a8cb510a2ed2f53f60ba4b2e722f4bc64954c606 (diff) | |
download | rneovim-de0a9548f7bf55bdf0202a2dcebb86a92f2d989d.tar.gz rneovim-de0a9548f7bf55bdf0202a2dcebb86a92f2d989d.tar.bz2 rneovim-de0a9548f7bf55bdf0202a2dcebb86a92f2d989d.zip |
Merge #7806 from ZyX-I/list-stat
Add a way to collect list usage statistics
Diffstat (limited to 'test/unit/eval/helpers.lua')
-rw-r--r-- | test/unit/eval/helpers.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index 6babd4be77..3d1c42c3a0 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -312,7 +312,7 @@ local lua2typvalt_type_tab = { processed[l].lv_refcount = processed[l].lv_refcount + 1 return typvalt(eval.VAR_LIST, {v_list=processed[l]}) end - local lst = populate_list(eval.tv_list_alloc(), l, processed) + local lst = populate_list(eval.tv_list_alloc(#l), l, processed) return typvalt(eval.VAR_LIST, {v_list=lst}) end, [dict_type] = function(l, processed) @@ -433,7 +433,8 @@ local function int(n) end local function list(...) - return populate_list(ffi.gc(eval.tv_list_alloc(), eval.tv_list_unref), + return populate_list(ffi.gc(eval.tv_list_alloc(select('#', ...)), + eval.tv_list_unref), {...}, {}) end |