Skip to content

Commit

Permalink
Replace deprecated macros with more recent ones in pvector C implemen…
Browse files Browse the repository at this point in the history
…tation
  • Loading branch information
tobgu committed Oct 16, 2023
1 parent aa32fb1 commit d84cc7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pvectorcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ static void PVector_dealloc(PVector *self) {
}

PyObject_GC_UnTrack((PyObject*)self);
Py_TRASHCAN_SAFE_BEGIN(self);
Py_TRASHCAN_BEGIN(self, PVector_dealloc);

releaseNode(0, self->tail);
releaseNode(self->shift, self->root);

PyObject_GC_Del(self);
Py_TRASHCAN_SAFE_END(self);
Py_TRASHCAN_END;
}

static PyObject *PVector_toList(PVector *self) {
Expand Down Expand Up @@ -1289,7 +1289,7 @@ static void cleanVector(PVector *vector) {

static void PVectorEvolver_dealloc(PVectorEvolver *self) {
PyObject_GC_UnTrack(self);
Py_TRASHCAN_SAFE_BEGIN(self);
Py_TRASHCAN_BEGIN(self, PVectorEvolver_dealloc);

if(self->originalVector != self->newVector) {
cleanVector(self->newVector);
Expand All @@ -1300,7 +1300,7 @@ static void PVectorEvolver_dealloc(PVectorEvolver *self) {
Py_DECREF(self->appendList);

PyObject_GC_Del(self);
Py_TRASHCAN_SAFE_END(self);
Py_TRASHCAN_END;
}

static PyObject *PVectorEvolver_append(PVectorEvolver *self, PyObject *args) {
Expand Down

0 comments on commit d84cc7e

Please sign in to comment.