8000 GH-90699: Remove remaining `_Py_IDENTIFIER` stdlib usage by kumaraditya303 · Pull Request #99067 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-90699: Remove remaining _Py_IDENTIFIER stdlib usage #99067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Nov 7, 2022
Prev Previous commit
Next Next commit
fix up
  • Loading branch information
kumaraditya303 authored Nov 3, 2022
commit a1d2eede316bcce7491d3095e61b2dec9a3a57f3
4 changes: 2 additions & 2 deletions Include/internal/pycore_global_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {
#define STRUCT_FOR_STR(NAME, LITERAL) \
STRUCT_FOR_ASCII_STR(LITERAL) _ ## NAME;
#define STRUCT_FOR_ID(NAME) \
STRUCT_FOR_ASCII_STR(#NAME) _ ## NAME;
STRUCT_FOR_ASCII_STR(#NAME) __id__ ## NAME;

// XXX Order by frequency of use?

Expand Down Expand Up @@ -716,7 +716,7 @@ struct _Py_global_strings {


#define _Py_ID(NAME) \
(_Py_SINGLETON(strings.identifiers._ ## NAME._ascii.ob_base))
(_Py_SINGLETON(strings.identifiers.__id__ ## NAME._ascii.ob_base))
#define _Py_STR(NAME) \
(_Py_SINGLETON(strings.literals._ ## NAME._ascii.ob_base))

Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_runtime_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extern "C" {
#define INIT_STR(NAME, LITERAL) \
._ ## NAME = _PyASCIIObject_INIT(LITERAL)
#define INIT_ID(NAME) \
._ ## NAME = _PyASCIIObject_INIT(#NAME)
.__id__ ## NAME = _PyASCIIObject_INIT(#NAME)
#define _PyUnicode_LATIN1_INIT(LITERAL, UTF8) \
{ \
._latin1 = { \
Expand Down
0