Skip to content

Commit bea5785

Browse files
authored
Merge pull request #284 from musicinmybrain/python3.13
Replace _PyList_Extend with PyList_SetSlice
2 parents 3e47777 + c876adc commit bea5785

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pvectorcmodule.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,12 +1313,10 @@ static PyObject *PVectorEvolver_append(PVectorEvolver *self, PyObject *args) {
13131313
}
13141314

13151315
static PyObject *PVectorEvolver_extend(PVectorEvolver *self, PyObject *args) {
1316-
PyObject *retVal = _PyList_Extend((PyListObject *)self->appendList, args);
1317-
if (retVal == NULL) {
1316+
if (PyList_SetSlice(self->appendList, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, args) < 0) {
13181317
return NULL;
13191318
}
13201319

1321-
Py_DECREF(retVal);
13221320
Py_INCREF(self);
13231321
return (PyObject*)self;
13241322
}

0 commit comments

Comments
 (0)