mirror of
https://github.com/python/cpython.git
synced 2025-12-02 15:48:58 +00:00
Added extern declarations for reference count admin debug functions.
This commit is contained in:
parent
f67a57efc4
commit
d86b38003d
1 changed files with 10 additions and 3 deletions
|
|
@ -292,15 +292,22 @@ environment the global variable trick is not safe.)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Py_TRACE_REFS
|
||||||
|
extern void _Py_Dealloc Py_PROTO((PyObject *));
|
||||||
|
extern void _Py_NewReference Py_PROTO((PyObject *));
|
||||||
|
extern void _Py_ForgetReference Py_PROTO((PyObject *));
|
||||||
|
extern void _Py_PrintReferences Py_PROTO((FILE *));
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef Py_TRACE_REFS
|
#ifndef Py_TRACE_REFS
|
||||||
#ifdef COUNT_ALLOCS
|
#ifdef COUNT_ALLOCS
|
||||||
#define _Py_Dealloc(op) ((op)->ob_type->tp_free++, (*(op)->ob_type->tp_dealloc)((PyObject *)(op)))
|
#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++)
|
#define _Py_ForgetReference(op) ((op)->ob_type->tp_free++)
|
||||||
#else
|
#else /* !COUNT_ALLOCS */
|
||||||
#define _Py_Dealloc(op) (*(op)->ob_type->tp_dealloc)((PyObject *)(op))
|
#define _Py_Dealloc(op) (*(op)->ob_type->tp_dealloc)((PyObject *)(op))
|
||||||
#define _Py_ForgetReference(op) /*empty*/
|
#define _Py_ForgetReference(op) /*empty*/
|
||||||
#endif
|
#endif /* !COUNT_ALLOCS */
|
||||||
#endif
|
#endif /* !Py_TRACE_REFS */
|
||||||
|
|
||||||
#ifdef COUNT_ALLOCS
|
#ifdef COUNT_ALLOCS
|
||||||
extern void inc_count Py_PROTO((PyTypeObject *));
|
extern void inc_count Py_PROTO((PyTypeObject *));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue