diff --git a/Include/cpython/object.h b/Include/cpython/object.h index 304cfbfc37d..ae3920d4508 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -9,10 +9,6 @@ PyAPI_FUNC(void) _Py_NewReference(PyObject *op); PyAPI_FUNC(void) _Py_ForgetReference(PyObject *); #endif -/* 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_REF_DEBUG PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void); #endif diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 14444a70ceb..9740717b8a3 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -15,6 +15,12 @@ extern "C" { PyAPI_FUNC(int) _PyType_CheckConsistency(PyTypeObject *type); PyAPI_FUNC(int) _PyDict_CheckConsistency(PyObject *mp, int check_content); +/* Update the Python traceback of an object. This function must be called + when a memory block is reused from a free list. + + Internal function called by _Py_NewReference(). */ +extern int _PyTraceMalloc_NewReference(PyObject *op); + // Fast inlined version of PyType_HasFeature() static inline int _PyType_HasFeature(PyTypeObject *type, unsigned long feature) {