From: Sjoerd Mullender Date: Mon, 18 Sep 1995 10:49:04 +0000 (+0000) Subject: Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise X-Git-Tag: v1.3~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f011d7ad5671f320ace1502669469af7b4051f0;p=thirdparty%2FPython%2Fcpython.git Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise may get inc_count sanity check abort). --- diff --git a/Objects/classobject.c b/Objects/classobject.c index 94ed2db2026b..550ee1cb4f53 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -351,11 +351,11 @@ instance_dealloc(inst) /* much too complicated if TRACE_REFS defined */ extern long ref_total; inst->ob_type = &Instancetype; + NEWREF(inst); ref_total--; /* compensate for increment in NEWREF */ #ifdef COUNT_ALLOCS inst->ob_type->tp_alloc--; /* ditto */ #endif - NEWREF(inst); #else INCREF(inst); #endif /* TRACE_REFS */