diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2014-11-20 11:39:37 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2014-11-20 11:39:37 (GMT) |
commit | d600951748d7a19cdb3e58a376c51ed804b630e6 (patch) | |
tree | c28038ac0a6f2dbab55ceee1217ab8efb61cd64d /Include/object.h | |
parent | 66fb349d6ca325f54f2f89986146ddb8f3bcbef4 (diff) | |
download | cpython-d600951748d7a19cdb3e58a376c51ed804b630e6.zip cpython-d600951748d7a19cdb3e58a376c51ed804b630e6.tar.gz cpython-d600951748d7a19cdb3e58a376c51ed804b630e6.tar.bz2 |
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.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h index e348d61..e29608a 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 |