summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorSjoerd Mullender <sjoerd@acm.org>1995-04-06 13:47:48 (GMT)
committerSjoerd Mullender <sjoerd@acm.org>1995-04-06 13:47:48 (GMT)
commit91e7a0bd2a02e885fd145bf6e19c1f8ed97a99a6 (patch)
tree54d13db86c9045df5b9f39f49dea517c284ae762 /Include/object.h
parent8f7871eec33b414da19d76f627c8e7b98b0c2951 (diff)
downloadcpython-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.h3
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 *));