Commit 6f011d7a authored by Sjoerd Mullender's avatar Sjoerd Mullender

Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise

may get inc_count sanity check abort).
parent 0c6563f7
...@@ -351,11 +351,11 @@ instance_dealloc(inst) ...@@ -351,11 +351,11 @@ instance_dealloc(inst)
/* much too complicated if TRACE_REFS defined */ /* much too complicated if TRACE_REFS defined */
extern long ref_total; extern long ref_total;
inst->ob_type = &Instancetype; inst->ob_type = &Instancetype;
NEWREF(inst);
ref_total--; /* compensate for increment in NEWREF */ ref_total--; /* compensate for increment in NEWREF */
#ifdef COUNT_ALLOCS #ifdef COUNT_ALLOCS
inst->ob_type->tp_alloc--; /* ditto */ inst->ob_type->tp_alloc--; /* ditto */
#endif #endif
NEWREF(inst);
#else #else
INCREF(inst); INCREF(inst);
#endif /* TRACE_REFS */ #endif /* TRACE_REFS */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment