bpo-37253: Add _PyCompilerFlags_INIT macro (GH-14018)
Add a new _PyCompilerFlags_INIT macro to initialize PyCompilerFlags
variables, rather than initializing cf_flags and cf_feature_version
explicitly in each variable.
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index 36f9214..079d00f 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -336,8 +336,7 @@
if (o != 0) {
o->st_node = st;
o->st_type = type;
- o->st_flags.cf_flags = 0;
- o->st_flags.cf_feature_version = PY_MINOR_VERSION;
+ o->st_flags = _PyCompilerFlags_INIT;
}
else {
PyNode_Free(st);