summaryrefslogtreecommitdiff
path: root/Include/object.h
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2014-11-20 21:39:37 +1000
committerNick Coghlan <ncoghlan@gmail.com>2014-11-20 21:39:37 +1000
commitd600951748d7a19cdb3e58a376c51ed804b630e6 (patch)
treec28038ac0a6f2dbab55ceee1217ab8efb61cd64d /Include/object.h
parent66fb349d6ca325f54f2f89986146ddb8f3bcbef4 (diff)
downloadcpython-git-d600951748d7a19cdb3e58a376c51ed804b630e6.tar.gz
Issue #22869: Split pythonrun into two modules
- interpreter startup and shutdown code moved to a new pylifecycle.c module - Py_OptimizeFlag moved into the new module with the other global flags
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h
index e348d61d1b..e29608aed6 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -65,6 +65,7 @@ whose size is determined when the object is allocated.
#error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG
#endif
+
#ifdef Py_TRACE_REFS
/* Define pointers to support a doubly-linked list of all live heap objects. */
#define _PyObject_HEAD_EXTRA \
@@ -710,11 +711,17 @@ PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void);
_Py_NegativeRefcount(__FILE__, __LINE__, \
(PyObject *)(OP)); \
}
+/* Py_REF_DEBUG also controls the display of refcounts and memory block
+ * allocations at the interactive prompt and at interpreter shutdown
+ */
+PyAPI_FUNC(void) _PyDebug_PrintTotalRefs(void);
+#define _PY_DEBUG_PRINT_TOTAL_REFS() _PyDebug_PrintTotalRefs()
#else
#define _Py_INC_REFTOTAL
#define _Py_DEC_REFTOTAL
#define _Py_REF_DEBUG_COMMA
#define _Py_CHECK_REFCNT(OP) /* a semicolon */;
+#define _PY_DEBUG_PRINT_TOTAL_REFS()
#endif /* Py_REF_DEBUG */
#ifdef COUNT_ALLOCS