mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -4546,6 +4546,7 @@ object_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
Py_DECREF(sorted_methods);
|
||||
return NULL;
|
||||
}
|
||||
_Py_DECLARE_STR(comma_sep, ", ");
|
||||
joined = PyUnicode_Join(&_Py_STR(comma_sep), sorted_methods);
|
||||
method_count = PyObject_Length(sorted_methods);
|
||||
Py_DECREF(sorted_methods);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue