summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSjoerd Mullender <sjoerd@acm.org>1995-09-18 10:49:04 (GMT)
committerSjoerd Mullender <sjoerd@acm.org>1995-09-18 10:49:04 (GMT)
commit6f011d7ad5671f320ace1502669469af7b4051f0 (patch)
tree957ee5cf34dbc0a053fabf8c8c256f13c505094e /Objects
parent0c6563f7c7a435253f49d44806bc1a926de8741a (diff)
downloadcpython-6f011d7ad5671f320ace1502669469af7b4051f0.zip
cpython-6f011d7ad5671f320ace1502669469af7b4051f0.tar.gz
cpython-6f011d7ad5671f320ace1502669469af7b4051f0.tar.bz2
Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise
may get inc_count sanity check abort).
Diffstat (limited to 'Objects')
-rw-r--r--Objects/classobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 94ed2db..550ee1c 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 */