From: Wei Tang Date: Fri, 26 Dec 2025 15:54:46 +0000 (+0000) Subject: patch 9.1.2022: using C++ keyword class as member variable name X-Git-Tag: v9.1.2022^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43b87938f5f4b1322607142dcccdbe20d5259ad6;p=thirdparty%2Fvim.git patch 9.1.2022: using C++ keyword class as member variable name 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 Signed-off-by: Christian Brabandt --- diff --git a/src/eval.c b/src/eval.c index d7ce2a17e4..75418c449d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; } /* diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 638a5faa99..8eda9ccee7 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -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 }; diff --git a/src/version.c b/src/version.c index 00146a0a52..c88bff30ab 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 */ +/**/ + 2022, /**/ 2021, /**/ diff --git a/src/vim9class.c b/src/vim9class.c index 11b4c43f58..9d0521a42e 100644 --- a/src/vim9class.c +++ b/src/vim9class.c @@ -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