mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise
may get inc_count sanity check abort).
This commit is contained in:
parent
0c6563f7c7
commit
6f011d7ad5
1 changed files with 1 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue