]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added extern declarations for reference count admin debug functions.
authorGuido van Rossum <guido@python.org>
Mon, 12 Aug 1996 21:31:32 +0000 (21:31 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 12 Aug 1996 21:31:32 +0000 (21:31 +0000)
Include/object.h

index 782b57cb8745a58aa422a124559ca546a30d8b36..dcb2383f5e64727404a955c48ec7b15272d8ccfb 100644 (file)
@@ -292,15 +292,22 @@ environment the global variable trick is not safe.)
 #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
 #ifdef COUNT_ALLOCS
 #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++)
-#else
+#else /* !COUNT_ALLOCS */
 #define _Py_Dealloc(op) (*(op)->ob_type->tp_dealloc)((PyObject *)(op))
 #define _Py_ForgetReference(op) /*empty*/
-#endif
-#endif
+#endif /* !COUNT_ALLOCS */
+#endif /* !Py_TRACE_REFS */
 
 #ifdef COUNT_ALLOCS
 extern void inc_count Py_PROTO((PyTypeObject *));