mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Also count UNREF's as freeing an object (only relevant when
COUNT_ALLOCS is defined).
This commit is contained in:
parent
8f7871eec3
commit
91e7a0bd2a
1 changed files with 2 additions and 1 deletions
|
@ -295,11 +295,12 @@ environment the global variable trick is not safe.)
|
|||
#ifndef Py_TRACE_REFS
|
||||
#ifdef COUNT_ALLOCS
|
||||
#define _Py_Dealloc(op) ((op)->ob_type->tp_free++, (*(op)->ob_type->tp_dealloc)((PyObject *)(op)))
|
||||
#define _Py_ForgetReference(op) ((op)->ob_type->tp_free++)
|
||||
#else
|
||||
#define _Py_Dealloc(op) (*(op)->ob_type->tp_dealloc)((PyObject *)(op))
|
||||
#endif
|
||||
#define _Py_ForgetReference(op) /*empty*/
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef COUNT_ALLOCS
|
||||
extern void inc_count Py_PROTO((PyTypeObject *));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue