Mercurial > vim
changeset 27026:32120100fde8 v8.2.4042
patch 8.2.4042: Vim9: build error
Commit: https://github.com/vim/vim/commit/143367256836b0f69881dc0c65ff165ae091dbc5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 8 16:02:59 2022 +0000
patch 8.2.4042: Vim9: build error
Problem: Vim9: build error.
Solution: Use grow array instead of character pointer.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Jan 2022 17:15:03 +0100 |
parents | 4aa691048c1c |
children | 167e35b85720 |
files | src/version.c src/vim9execute.c |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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;