]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0100: Using reserved keyword new as function argument v9.2.0100
authorWei Tang <gauchyler@uestc.edu.cn>
Tue, 3 Mar 2026 19:50:15 +0000 (19:50 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 3 Mar 2026 19:50:15 +0000 (19:50 +0000)
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 <gauchyler@uestc.edu.cn>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/highlight.c
src/proto/highlight.pro
src/version.c

index b22cda58703c0940cc94a6d638911ae835ff102f..efd24b647bc551a7b909272ec3f70af7743d7a82 100644 (file)
@@ -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;
        }
index a7691c88fc73a268ff2eed217333af6995ceded6..46fb5dbbed068e986d5080d9520f874fea5aafc4 100644 (file)
@@ -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);
index f2e546cb1acea2620a54b6a73f385cf14fd6e6ba..4f86d6cc12026f629b31807c7edf244755c25182 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    100,
 /**/
     99,
 /**/