mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
bpo-46541: Discover the global strings. (gh-31346)
Instead of manually enumerating the global strings in generate_global_objects.py, we extrapolate the list from usage of _Py_ID() and _Py_STR() in the source files. This is partly inspired by gh-31261. https://bugs.python.org/issue46541
This commit is contained in:
parent
278fdd3e3a
commit
12360aa159
9 changed files with 103 additions and 274 deletions
|
@ -186,8 +186,8 @@ check_matched(PyInterpreterState *interp, PyObject *obj, PyObject *arg)
|
|||
return rc;
|
||||
}
|
||||
|
||||
#define GET_WARNINGS_ATTR(interp, attr, try_import) \
|
||||
get_warnings_attr(interp, &_Py_ID(attr), try_import)
|
||||
#define GET_WARNINGS_ATTR(interp, ATTR, try_import) \
|
||||
get_warnings_attr(interp, &_Py_ID(ATTR), try_import)
|
||||
|
||||
/*
|
||||
Returns a new reference.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue