diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-08 16:02:59 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-08 16:02:59 +0000 |
commit | 143367256836b0f69881dc0c65ff165ae091dbc5 (patch) | |
tree | 220715491982736ba016dd791a781ea1ade51388 | |
parent | aa9b3cacd52a6c34591bbd89fb6b06d4c097fe03 (diff) | |
download | vim-git-143367256836b0f69881dc0c65ff165ae091dbc5.tar.gz |
patch 8.2.4042: Vim9: build errorv8.2.4042
Problem: Vim9: build error.
Solution: Use grow array instead of character pointer.
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9execute.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/version.c b/src/version.c index 27512d44f..579718e7b 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4042, +/**/ 4041, /**/ 4040, diff --git a/src/vim9execute.c b/src/vim9execute.c index 63c07fe04..5fab27dc4 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -3344,13 +3344,14 @@ exec_instructions(ectx_T *ectx) list_functions(NULL); else { - exarg_T ea; - char_u *line_to_free = NULL; + exarg_T ea; + garray_T lines_to_free; CLEAR_FIELD(ea); ea.cmd = ea.arg = iptr->isn_arg.string; - define_function(&ea, NULL, &line_to_free); - vim_free(line_to_free); + ga_init2(&lines_to_free, sizeof(char_u *), 50); + define_function(&ea, NULL, &lines_to_free); + ga_clear_strings(&lines_to_free); } break; |