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 <gauchyler@uestc.edu.cn>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Wei Tang
2025-12-26 15:54:46 +00:00
committed by Christian Brabandt
parent 538da34ad3
commit 43b87938f5
4 changed files with 5 additions and 3 deletions
+1 -1
View 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;
}
/*
+1 -1
View 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
};
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2022,
/**/
2021,
/**/
+1 -1
View 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