From: Wei Tang Date: Tue, 3 Mar 2026 19:50:15 +0000 (+0000) Subject: patch 9.2.0100: Using reserved keyword new as function argument X-Git-Tag: v9.2.0100^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=238a84621d9fa3a48fa46567383a147704205b2e;p=thirdparty%2Fvim.git patch 9.2.0100: Using reserved keyword new as function argument Problem: A recent commit introduced a new function named `update_highlight_overrides()` in `highlight.pro` and `highlight.c`, one of the parameter names conflicts with the C++ keyword `new`. This causes compilation issues on Windows when VIM is compiled with OLE enabled, as "if_ole.cpp" cannot compile due to the conflict (after v9.2.0093). Solution: Rename the parameter name of `update_highlight_overrides()` from new to hl_new (Wei Tang) fixes: #19568 closes: #19558 Signed-off-by: Wei Tang Signed-off-by: Christian Brabandt --- diff --git a/src/highlight.c b/src/highlight.c index b22cda5870..efd24b647b 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -5458,11 +5458,11 @@ f_hlset(typval_T *argvars, typval_T *rettv) #endif /* - * If "old" is in the override stack, then update it to "new". Does not free + * If "old" is in the override stack, then update it to "hl_new". Does not free * "old". */ void -update_highlight_overrides(hl_override_T *old, hl_override_T *new, int newlen) +update_highlight_overrides(hl_override_T *old, hl_override_T *hl_new, int newlen) { if (old == NULL) return; @@ -5471,7 +5471,7 @@ update_highlight_overrides(hl_override_T *old, hl_override_T *new, int newlen) { if (set->arr == old) { - set->arr = new; + set->arr = hl_new; set->len = newlen; break; } diff --git a/src/proto/highlight.pro b/src/proto/highlight.pro index a7691c88fc..46fb5dbbed 100644 --- a/src/proto/highlight.pro +++ b/src/proto/highlight.pro @@ -48,7 +48,7 @@ int expand_highlight_group(char_u *pat, expand_T *xp, regmatch_T *rmp, char_u ** void free_highlight_fonts(void); void f_hlget(typval_T *argvars, typval_T *rettv); void f_hlset(typval_T *argvars, typval_T *rettv); -void update_highlight_overrides(hl_override_T *old, hl_override_T *new, int newlen); +void update_highlight_overrides(hl_override_T *old, hl_override_T *hl_new, int newlen); bool push_highlight_overrides(hl_override_T *arr, int len); void pop_highlight_overrides(void); char *update_winhighlight(win_T *wp, char_u *opt); diff --git a/src/version.c b/src/version.c index f2e546cb1a..4f86d6cc12 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 100, /**/ 99, /**/