patch 8.2.4042: Vim9: build error
Problem: Vim9: build error.
Solution: Use grow array instead of character pointer.
diff --git a/src/version.c b/src/version.c
index 27512d4..579718e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
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 63c07fe..5fab27d 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -3344,13 +3344,14 @@
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;