mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
bpo-39487: Merge duplicated _Py_IDENTIFIER identifiers in C code (GH-18254)
Moving repetitive `_Py_IDENTIFIER` instances to a global location helps identify them more easily in regards to sub-interpreter support.
This commit is contained in:
parent
c232c9110c
commit
46874c26ee
12 changed files with 24 additions and 34 deletions
|
|
@ -18,6 +18,8 @@ typedef struct {
|
|||
PyObject *length;
|
||||
} rangeobject;
|
||||
|
||||
_Py_IDENTIFIER(iter);
|
||||
|
||||
/* Helper function for validating step. Always returns a new reference or
|
||||
NULL on error.
|
||||
*/
|
||||
|
|
@ -757,7 +759,6 @@ PyDoc_STRVAR(length_hint_doc,
|
|||
static PyObject *
|
||||
rangeiter_reduce(rangeiterobject *r, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
_Py_IDENTIFIER(iter);
|
||||
PyObject *start=NULL, *stop=NULL, *step=NULL;
|
||||
PyObject *range;
|
||||
|
||||
|
|
@ -915,7 +916,6 @@ longrangeiter_len(longrangeiterobject *r, PyObject *no_args)
|
|||
static PyObject *
|
||||
longrangeiter_reduce(longrangeiterobject *r, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
_Py_IDENTIFIER(iter);
|
||||
PyObject *product, *stop=NULL;
|
||||
PyObject *range;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue