From c876adc774e7bb3c896b013f13d7c6ce80e79544 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 26 Oct 2023 09:53:40 -0400
Subject: [PATCH] Replace _PyList_Extend with PyList_SetSlice

Index: pvectorcmodule.c
--- pvectorcmodule.c.orig
+++ pvectorcmodule.c
@@ -1313,12 +1313,10 @@ static PyObject *PVectorEvolver_append(PVectorEvolver 
 }
 
 static PyObject *PVectorEvolver_extend(PVectorEvolver *self, PyObject *args) {
-  PyObject *retVal = _PyList_Extend((PyListObject *)self->appendList, args);
-  if (retVal == NULL) {
+  if (PyList_SetSlice(self->appendList, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, args) < 0) {
     return NULL;
   }
 
-  Py_DECREF(retVal);
   Py_INCREF(self);
   return (PyObject*)self;
 }
