diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-05 10:40:02 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-05 10:40:53 -0500 |
commit | 1aacab49ea0e5cff94bd89595737b6af677f4490 (patch) | |
tree | 3d917be003cb49e95a3ea021145701f44cfb39b9 /test/unit/eval/helpers.lua | |
parent | 3a3fb0860248b42e05de6591d4b7727453efdef2 (diff) | |
download | rneovim-1aacab49ea0e5cff94bd89595737b6af677f4490.tar.gz rneovim-1aacab49ea0e5cff94bd89595737b6af677f4490.tar.bz2 rneovim-1aacab49ea0e5cff94bd89595737b6af677f4490.zip |
vim-patch:8.1.1579: dict and list could be GC'ed while displaying error
Problem: Dict and list could be GC'ed while displaying error in a timer.
(Yasuhiro Matsumoto)
Solution: Block garbage collection when executing a timer. Add
test_garbagecollect_soon(). Add "no_wait_return" to
test_override(). (closes vim/vim#4571)
https://github.com/vim/vim/commit/adc6714aac20f5462a0ecec50ab4806b2f3ab0db
Diffstat (limited to 'test/unit/eval/helpers.lua')
-rw-r--r-- | test/unit/eval/helpers.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index 3d1c42c3a0..bcd7c750c5 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -406,7 +406,7 @@ end local alloc_logging_helpers = { list = function(l) return {func='calloc', args={1, ffi.sizeof('list_T')}, ret=void(l)} end, li = function(li) return {func='malloc', args={ffi.sizeof('listitem_T')}, ret=void(li)} end, - dict = function(d) return {func='malloc', args={ffi.sizeof('dict_T')}, ret=void(d)} end, + dict = function(d) return {func='calloc', args={1, ffi.sizeof('dict_T')}, ret=void(d)} end, di = function(di, size) size = alloc_len(size, function() return di.di_key end) return {func='malloc', args={ffi.offsetof('dictitem_T', 'di_key') + size + 1}, ret=void(di)} |