Skip to content

Commit 2b50446

Browse files
committed
use PyObject_GC_Del for clarity
1 parent 81f77b6 commit 2b50446

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_bz2module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ BZ2Compressor_dealloc(PyObject *op)
392392
if (self->lock != NULL) {
393393
PyThread_free_lock(self->lock);
394394
}
395-
tp->tp_free((PyObject *)self);
395+
PyObject_GC_Del(self);
396396
Py_DECREF(tp);
397397
}
398398

@@ -704,7 +704,7 @@ BZ2Decompressor_dealloc(PyObject *op)
704704
if (self->lock != NULL) {
705705
PyThread_free_lock(self->lock);
706706
}
707-
tp->tp_free((PyObject *)self);
707+
PyObject_GC_Del(self);
708708
Py_DECREF(tp);
709709
}
710710

0 commit comments

Comments
 (0)