diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-11-09 16:53:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 16:53:21 (GMT) |
commit | 6e3cc72afeaee2532b4327776501eb8234ac787b (patch) | |
tree | a951ff89cfdec4cc449dd92a7e36372abd103f78 /Include/cpython | |
parent | c03e05c2e72f3ea5e797389e7d1042eef85ad37a (diff) | |
download | cpython-6e3cc72afeaee2532b4327776501eb8234ac787b.zip cpython-6e3cc72afeaee2532b4327776501eb8234ac787b.tar.gz cpython-6e3cc72afeaee2532b4327776501eb8234ac787b.tar.bz2 |
GH-90699: disallow `_Py_IDENTIFIER` in core code (GH-99210)
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/object.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h index d07cb3b..f4755a7 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -41,7 +41,7 @@ typedef struct _Py_Identifier { Py_ssize_t index; } _Py_Identifier; -#if defined(NEEDS_PY_IDENTIFIER) || !defined(Py_BUILD_CORE) +#ifndef Py_BUILD_CORE // For now we are keeping _Py_IDENTIFIER for continued use // in non-builtin extensions (and naughty PyPI modules). @@ -49,7 +49,7 @@ typedef struct _Py_Identifier { #define _Py_static_string(varname, value) static _Py_Identifier varname = _Py_static_string_init(value) #define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname) -#endif /* NEEDS_PY_IDENTIFIER */ +#endif /* !Py_BUILD_CORE */ typedef struct { /* Number implementations must check *both* |