]> git.feebdaed.xyz Git - 0xmirror/vim.git/commitdiff
patch 9.1.2022: using C++ keyword class as member variable name
authorWei Tang <gauchyler@uestc.edu.cn>
Fri, 26 Dec 2025 15:54:46 +0000 (15:54 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 26 Dec 2025 15:54:46 +0000 (15:54 +0000)
Problem:  A recent commit introduced a member variable named `class` in
          the `exarg` structure, which conflicts with the C++ keyword
          `class`. This causes compilation issues on Windows when VIM
          is compiled with OLE enabled, as "if_ole.cpp" cannot compile
          due to the keyword conflict (after v9.1.2012).
Solution: Rename the member variable of `exarg` from `class` to `ea_class`.
          (Wei Tang)

related: #18949
closes:  #19016

Signed-off-by: Wei Tang <gauchyler@uestc.edu.cn>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/eval.c
src/ex_cmds.h
src/version.c
src/vim9class.c

index d7ce2a17e457e9ec8e589bca0ed811dd0f343fe3..75418c449df84c70b4d35238a7ae0fb39a276300 100644 (file)
@@ -131,7 +131,7 @@ fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, int skip)
        evalarg->eval_getline = eap->ea_getline;
        evalarg->eval_cookie = eap->cookie;
     }
-    evalarg->eval_class = eap->class;
+    evalarg->eval_class = eap->ea_class;
 }
 
 /*
index 638a5faa9998dd33b88269517e5b514b53efc51d..8eda9ccee71d4d82e0e09e434c657d6963e3159e 100644 (file)
@@ -1973,7 +1973,7 @@ struct exarg
     void       *cookie;        // argument for getline()
 #ifdef FEAT_EVAL
     cstack_T   *cstack;        // condition stack for ":if" etc.
-    class_T    *class;         // Name of class being defined. Used by :class
+    class_T    *ea_class;              // Name of class being defined. Used by :class
                                // and :enum commands.
 #endif
 };
index 00146a0a5298a54bc64875a54d6474e0abef4814..c88bff30ab5d474916455fa9074221fce5ba934c 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2022,
 /**/
     2021,
 /**/
index 11b4c43f58e84285dab2d69276dc398afb1a2609..9d0521a42e18121a07c829de5e5a48aef52704be 100644 (file)
@@ -2122,7 +2122,7 @@ early_ret:
     cl->class_object_type.tt_type = VAR_OBJECT;
     cl->class_object_type.tt_class = cl;
 
-    eap->class = cl;
+    eap->ea_class = cl;
 
     // Add the class to the script-local variables.
     // TODO: handle other context, e.g. in a function