mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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.
(cherry picked from commit 37d66d7d4b
)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
parent
c15a682603
commit
92e836c7dc
8 changed files with 15 additions and 29 deletions
|
@ -30,6 +30,9 @@ typedef struct {
|
|||
int cf_flags; /* bitmask of CO_xxx flags relevant to future */
|
||||
int cf_feature_version; /* minor Python version (PyCF_ONLY_AST) */
|
||||
} PyCompilerFlags;
|
||||
|
||||
#define _PyCompilerFlags_INIT \
|
||||
(PyCompilerFlags){.cf_flags = 0, .cf_feature_version = PY_MINOR_VERSION}
|
||||
#endif
|
||||
|
||||
/* Future feature support */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue