Remove types from type_list if they have no objects

and unlist_types_without_objects is set.
Give dump_counts a FILE* argument.
This commit is contained in:
Martin v. Löwis 2006-04-18 06:24:08 +00:00
parent 041669fa67
commit 45294a9562
4 changed files with 47 additions and 9 deletions

View file

@ -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