diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-04-18 06:24:08 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-04-18 06:24:08 (GMT) |
commit | 45294a9562e5c360ee8ef8498d8792e05a6eb25e (patch) | |
tree | bc3aea94480f2eb7507cf77d86a4975d29d9e871 /Include | |
parent | 041669fa67198a5bf18da962ea19edb2af3f7e9d (diff) | |
download | cpython-45294a9562e5c360ee8ef8498d8792e05a6eb25e.zip cpython-45294a9562e5c360ee8ef8498d8792e05a6eb25e.tar.gz cpython-45294a9562e5c360ee8ef8498d8792e05a6eb25e.tar.bz2 |
Remove types from type_list if they have no objects
and unlist_types_without_objects is set.
Give dump_counts a FILE* argument.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/object.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/object.h b/Include/object.h index c6d0fc3..4b0e080 100644 --- a/Include/object.h +++ b/Include/object.h @@ -339,6 +339,7 @@ typedef struct _typeobject { Py_ssize_t tp_allocs; Py_ssize_t tp_frees; Py_ssize_t tp_maxalloc; + struct _typeobject *tp_prev; struct _typeobject *tp_next; #endif } PyTypeObject; @@ -598,8 +599,9 @@ PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void); #ifdef COUNT_ALLOCS PyAPI_FUNC(void) inc_count(PyTypeObject *); +PyAPI_FUNC(void) dec_count(PyTypeObject *); #define _Py_INC_TPALLOCS(OP) inc_count((OP)->ob_type) -#define _Py_INC_TPFREES(OP) (OP)->ob_type->tp_frees++ +#define _Py_INC_TPFREES(OP) dec_count((OP)->ob_type) #define _Py_DEC_TPFREES(OP) (OP)->ob_type->tp_frees-- #define _Py_COUNT_ALLOCS_COMMA , #else |