Skip to content

Commit 91a3e21

Browse files
committed
smash diff
1 parent a9b6096 commit 91a3e21

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Modules/_bz2module.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ _bz2_BZ2Compressor_impl(PyTypeObject *type, int compresslevel)
371371
if (catch_bz2_error(bzerror))
372372
goto error;
373373

374-
PyObject_GC_Track(self);
375374
return (PyObject *)self;
376375

377376
error:
@@ -389,7 +388,7 @@ BZ2Compressor_dealloc(PyObject *op)
389388
if (self->lock != NULL) {
390389
PyThread_free_lock(self->lock);
391390
}
392-
PyObject_GC_Del(self);
391+
tp->tp_free(self);
393392
Py_DECREF(tp);
394393
}
395394

@@ -679,7 +678,6 @@ _bz2_BZ2Decompressor_impl(PyTypeObject *type)
679678
if (catch_bz2_error(bzerror))
680679
goto error;
681680

682-
PyObject_GC_Track(self);
683681
return (PyObject *)self;
684682

685683
error:
@@ -693,15 +691,16 @@ BZ2Decompressor_dealloc(PyObject *op)
693691
PyTypeObject *tp = Py_TYPE(op);
694692
PyObject_GC_UnTrack(op);
695693
BZ2Decompressor *self = _BZ2Decompressor_CAST(op);
696-
if(self->input_buffer != NULL) {
694+
695+
if (self->input_buffer != NULL) {
697696
PyMem_Free(self->input_buffer);
698697
}
699698
BZ2_bzDecompressEnd(&self->bzs);
700699
Py_CLEAR(self->unused_data);
701700
if (self->lock != NULL) {
702701
PyThread_free_lock(self->lock);
703702
}
704-
PyObject_GC_Del(self);
703+
tp->tp_free(self);
705704
Py_DECREF(tp);
706705
}
707706

0 commit comments

Comments
 (0)