diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 1995-04-06 13:47:48 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 1995-04-06 13:47:48 (GMT) |
commit | 91e7a0bd2a02e885fd145bf6e19c1f8ed97a99a6 (patch) | |
tree | 54d13db86c9045df5b9f39f49dea517c284ae762 /Include/object.h | |
parent | 8f7871eec33b414da19d76f627c8e7b98b0c2951 (diff) | |
download | cpython-91e7a0bd2a02e885fd145bf6e19c1f8ed97a99a6.zip cpython-91e7a0bd2a02e885fd145bf6e19c1f8ed97a99a6.tar.gz cpython-91e7a0bd2a02e885fd145bf6e19c1f8ed97a99a6.tar.bz2 |
Also count UNREF's as freeing an object (only relevant when
COUNT_ALLOCS is defined).
Diffstat (limited to 'Include/object.h')
-rw-r--r-- | Include/object.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/object.h b/Include/object.h index 0b85fd3..d1e60be 100644 --- a/Include/object.h +++ b/Include/object.h @@ -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 *)); |