summaryrefslogtreecommitdiff
path: root/Include/object.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-10-26 00:01:56 +0200
committerGitHub <noreply@github.com>2018-10-26 00:01:56 +0200
commitc89a93271447ec65e83a1dc7605e62dbf272cafd (patch)
treebaaf2c7ce7cea2581b0b33da5d1f5926238e7255 /Include/object.h
parent6c83d9f4a72905d968418bef670bb3091d2744db (diff)
downloadcpython-git-c89a93271447ec65e83a1dc7605e62dbf272cafd.tar.gz
bpo-35053: Define _PyTraceMalloc_NewReference in object.h (GH-10107)
_PyTraceMalloc_NewReference() is now called by _Py_NewReference(), so move its definition to object.h. Moreover, define it even if Py_LIMITED_API is defined, since _Py_NewReference() is also exposed even if Py_LIMITED_API is defined.
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h
index 4a49609c72..2809d3af18 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -765,6 +765,10 @@ PyAPI_FUNC(void) dec_count(PyTypeObject *);
#define _Py_COUNT_ALLOCS_COMMA
#endif /* COUNT_ALLOCS */
+/* Update the Python traceback of an object. This function must be called
+ when a memory block is reused from a free list. */
+PyAPI_FUNC(int) _PyTraceMalloc_NewReference(PyObject *op);
+
#ifdef Py_TRACE_REFS
/* Py_TRACE_REFS is such major surgery that we call external routines. */
PyAPI_FUNC(void) _Py_NewReference(PyObject *);