Skip to content

Commit

Permalink
Replace _PyList_Extend with PyList_SetSlice
Browse files Browse the repository at this point in the history
This private function is no longer exported in Python 3.13.

It is possible that a PyList_Extend() function-like macro may be added
before Python 3.13 final, but using PyList_SetSlice() directly will
still work.

python/cpython#108451

python/cpython#111138
  • Loading branch information
musicinmybrain committed Oct 26, 2023
1 parent 827c5c8 commit 5272878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pvectorcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ static PyObject *PVectorEvolver_append(PVectorEvolver *self, PyObject *args) {
}

static PyObject *PVectorEvolver_extend(PVectorEvolver *self, PyObject *args) {
PyObject *retVal = _PyList_Extend((PyListObject *)self->appendList, args);
PyObject *retVal = PyList_SetSlice((PyListObject *)self->appendList, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, args);
if (retVal == NULL) {
return NULL;
}
Expand Down

0 comments on commit 5272878

Please sign in to comment.