From d510bfbc8e447b1a60d5ec7faaa8f440eb4ef56f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 2 Apr 2023 10:11:42 +0200 Subject: refactor: remove char_u (#22829) Closes https://github.com/neovim/neovim/issues/459 --- test/unit/eval/helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/unit/eval/helpers.lua') diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index b600f01ab2..9dd6b76de2 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -349,7 +349,7 @@ local special_vals = nil lua2typvalt = function(l, processed) if not special_vals then special_vals = { - [null_string] = {'VAR_STRING', {v_string=ffi.cast('char_u*', nil)}}, + [null_string] = {'VAR_STRING', {v_string=ffi.cast('char*', nil)}}, [null_list] = {'VAR_LIST', {v_list=ffi.cast('list_T*', nil)}}, [null_dict] = {'VAR_DICT', {v_dict=ffi.cast('dict_T*', nil)}}, [nil_value] = {'VAR_SPECIAL', {v_special=eval.kSpecialVarNull}}, -- cgit From 8f69c5ed450337b9f77c50f9ee0d3eb32f649ca6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 14 Apr 2023 07:11:59 +0800 Subject: vim-patch:8.2.{0695,0725,0734,0753,0818,0819,0822} (#23075) vim-patch:8.2.0695: Vim9: cannot define a function inside a function Problem: Vim9: cannot define a function inside a function. Solution: Initial support for :def inside :def. https://github.com/vim/vim/commit/04b12697838b232b8b17c553ccc74cf1f1bdb81c vim-patch:8.2.0725: Vim9: cannot call a function declared later in Vim9 script Problem: Vim9: cannot call a function declared later in Vim9 script. Solution: Make two passes through the script file. https://github.com/vim/vim/commit/09689a02840be40fa7bb10b1921fb5bc5b2908f1 vim-patch:8.2.0734: Vim9: leaking memory when using :finish Problem: Vim9: leaking memory when using :finish. Solution: Do not check for next line in third pass. https://github.com/vim/vim/commit/04816717dfea6e2469ff4c9d40f68b59aaf03724 vim-patch:8.2.0753: Vim9: expressions are evaluated in the discovery phase Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants. https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38 vim-patch:8.2.0818: Vim9: using a discovery phase doesn't work well Problem: Vim9: using a discovery phase doesn't work well. Solution: Remove the discovery phase, instead compile a function only when it is used. Add :defcompile to compile def functions earlier. https://github.com/vim/vim/commit/822ba24743af9ee1b5e7f656a7a61a38f3638bca vim-patch:8.2.0819: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Remove the variable. https://github.com/vim/vim/commit/f40e51a880a95f94dbbbecc9476559506c2cc345 vim-patch:8.2.0822: Vim9: code left over from discovery phase Problem: Vim9: code left over from discovery phase. Solution: Remove the dead code. https://github.com/vim/vim/commit/2eec37926db6d31beb36f162ac00357a30c093c8 Co-authored-by: Bram Moolenaar --- test/unit/eval/helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/unit/eval/helpers.lua') diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index 9dd6b76de2..0694fceaec 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -512,7 +512,7 @@ end local function eval0(expr) local tv = ffi.gc(ffi.new('typval_T', {v_type=eval.VAR_UNKNOWN}), eval.tv_clear) - if eval.eval0(to_cstr(expr), tv, nil, true) == 0 then + if eval.eval0(to_cstr(expr), tv, nil, eval.EVAL_EVALUATE) == 0 then return nil else return tv -- cgit From bd83b587b18bb6f2ac555a992fa5b7d907de7e79 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 14 Apr 2023 07:22:01 +0800 Subject: vim-patch:8.2.1047: Vim9: script cannot use line continuation like :def function Problem: Vim9: script cannot use line continuation like in a :def function. Solution: Pass the getline function pointer to the eval() functions. Use it for addition and multiplication operators. https://github.com/vim/vim/commit/5409f5d8c95007216ae1190565a7a8ee9ebd7100 Omit source_nextline() and eval_next_non_blank(): Vim9 script only. N/A patches for version.c: vim-patch:8.2.1048: build failure without the eval feature Problem: Build failure without the eval feature. Solution: Add dummy typedef. https://github.com/vim/vim/commit/9d40c63c7dc8c3eb3886c58dcd334bc7f37eceba vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a Co-authored-by: Bram Moolenaar --- test/unit/eval/helpers.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/unit/eval/helpers.lua') diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index 0694fceaec..883f01bd84 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -512,7 +512,8 @@ end local function eval0(expr) local tv = ffi.gc(ffi.new('typval_T', {v_type=eval.VAR_UNKNOWN}), eval.tv_clear) - if eval.eval0(to_cstr(expr), tv, nil, eval.EVAL_EVALUATE) == 0 then + local evalarg = ffi.new('evalarg_T', {eval_flags = eval.EVAL_EVALUATE}) + if eval.eval0(to_cstr(expr), tv, nil, evalarg) == 0 then return nil else return tv -- cgit