aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-26 15:34:17 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-30 21:00:17 -0400
commit2a57dce9f2ea157a6f9b15613788cdd8cebc26e5 (patch)
tree74fb8a6dba09c1dc4e4bdc41fc7e3da4bada6bee /src/nvim/eval/funcs.c
parent4edf7b9ff22ca702876a7d0b5534fa2fc16b1897 (diff)
downloadrneovim-2a57dce9f2ea157a6f9b15613788cdd8cebc26e5.tar.gz
rneovim-2a57dce9f2ea157a6f9b15613788cdd8cebc26e5.tar.bz2
rneovim-2a57dce9f2ea157a6f9b15613788cdd8cebc26e5.zip
vim-patch:8.1.1319: computing function length name in many places
Problem: Computing function length name in many places. Solution: compute name length in call_func(). https://github.com/vim/vim/commit/6ed8819822994512c160006bd1204aa11ae3c494 In call_func(), reassign "len" param to (int)STRLEN(funcname) instead of using vim_strsave() which runs strlen(). "len" param is checked for v:lua functions. call_func() states that strlen() is used if "len" is set to -1.
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index bd77a3b7e2..83ad948a93 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -9174,7 +9174,7 @@ static int item_compare2(const void *s1, const void *s2, bool keep_zero)
rettv.v_type = VAR_UNKNOWN; // tv_clear() uses this
res = call_func((const char_u *)func_name,
- (int)STRLEN(func_name),
+ -1,
&rettv, 2, argv, NULL, 0L, 0L, &dummy, true,
partial, sortinfo->item_compare_selfdict);
tv_clear(&argv[0]);