summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 01def83..d85ff3c 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1173,8 +1173,9 @@ subtype_dealloc(PyObject *self)
}
if (type->tp_del) {
type->tp_del(self);
- if (self->ob_refcnt > 0)
+ if (Py_REFCNT(self) > 0) {
return;
+ }
}
/* Find the nearest base with a different tp_dealloc */
@@ -1239,7 +1240,7 @@ subtype_dealloc(PyObject *self)
if (type->tp_del) {
_PyObject_GC_TRACK(self);
type->tp_del(self);
- if (self->ob_refcnt > 0) {
+ if (Py_REFCNT(self) > 0) {
/* Resurrected */
goto endlabel;
}