summaryrefslogtreecommitdiffstats
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2022-02-15 00:36:51 (GMT)
committerGitHub <noreply@github.com>2022-02-15 00:36:51 (GMT)
commit12360aa159c42c7798fd14225d271e6fd84db7eb (patch)
treead2b4f0d67c90a5a0be4ff532082fc3468d6d65b /Python/_warnings.c
parent278fdd3e3a2492665b2c2888fd2f428f7f59a3f5 (diff)
downloadcpython-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.c4
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.