diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-01-30 23:20:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 23:20:25 (GMT) |
commit | 46874c26ee1fc752e2e6930efa1d223b2351edb8 (patch) | |
tree | b4c85470214ac73ec6e4fa9981bb1f0e7b46472e /Objects/rangeobject.c | |
parent | c232c9110cfefa0935cbf158e35e91746a8a9361 (diff) | |
download | cpython-46874c26ee1fc752e2e6930efa1d223b2351edb8.zip cpython-46874c26ee1fc752e2e6930efa1d223b2351edb8.tar.gz cpython-46874c26ee1fc752e2e6930efa1d223b2351edb8.tar.bz2 |
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.
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r-- | Objects/rangeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 9311f8b..e716820 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -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; |