Make PySequence_Fast_ITEMS public. (Thanks Skip.)
This commit is contained in:
parent
fba1cfc49a
commit
42bec93e5c
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue