diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-02-15 00:36:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-15 00:36:51 (GMT) |
commit | 12360aa159c42c7798fd14225d271e6fd84db7eb (patch) | |
tree | ad2b4f0d67c90a5a0be4ff532082fc3468d6d65b /Python/_warnings.c | |
parent | 278fdd3e3a2492665b2c2888fd2f428f7f59a3f5 (diff) | |
download | cpython-12360aa159c42c7798fd14225d271e6fd84db7eb.zip cpython-12360aa159c42c7798fd14225d271e6fd84db7eb.tar.gz cpython-12360aa159c42c7798fd14225d271e6fd84db7eb.tar.bz2 |
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
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index a47e5fe..03e6ffc 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -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. |