From: Sjoerd Mullender Date: Thu, 6 Apr 1995 13:47:48 +0000 (+0000) Subject: Also count UNREF's as freeing an object (only relevant when X-Git-Tag: v1.2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91e7a0bd2a02e885fd145bf6e19c1f8ed97a99a6;p=thirdparty%2FPython%2Fcpython.git Also count UNREF's as freeing an object (only relevant when COUNT_ALLOCS is defined). --- diff --git a/Include/object.h b/Include/object.h index 0b85fd3f4b81..d1e60be700a0 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 *));