diff --git a/Include/abstract.h b/Include/abstract.h index bc9df05d84d..17ce10551f7 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -1016,7 +1016,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ need to be corrected for a negative index */ -#define _PySequence_Fast_ITEMS(sf) \ +#define PySequence_Fast_ITEMS(sf) \ (PyList_Check(sf) ? ((PyListObject *)(sf))->ob_item \ : ((PyTupleObject *)(sf))->ob_item) /* Return a pointer to the underlying item array for diff --git a/Objects/listobject.c b/Objects/listobject.c index 9ee5756c3b1..3bda2453038 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -491,7 +491,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v) if(v_as_SF == NULL) return -1; n = PySequence_Fast_GET_SIZE(v_as_SF); - vitem = _PySequence_Fast_ITEMS(v_as_SF); + vitem = PySequence_Fast_ITEMS(v_as_SF); } if (ilow < 0) ilow = 0; @@ -686,7 +686,7 @@ listextend_internal(PyListObject *self, PyObject *b) } /* populate the end of self with b's items */ - src = _PySequence_Fast_ITEMS(b); + src = PySequence_Fast_ITEMS(b); dest = self->ob_item + selflen; for (i = 0; i < blen; i++) { PyObject *o = src[i]; @@ -2561,7 +2561,7 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value) PyMem_MALLOC(slicelength*sizeof(PyObject*)); selfitems = self->ob_item; - seqitems = _PySequence_Fast_ITEMS(seq); + seqitems = PySequence_Fast_ITEMS(seq); for (cur = start, i = 0; i < slicelength; cur += step, i++) { garbage[i] = selfitems[cur];