summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-16 15:29:50 (GMT)
committerGitHub <noreply@github.com>2020-06-16 15:29:50 (GMT)
commitfcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1 (patch)
tree3fbf0c0644220d965d5d8f53eae5108eb9989007 /Include
parentfc710ee266e9461fdba9933ec6004318db588820 (diff)
downloadcpython-fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1.zip
cpython-fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1.tar.gz
cpython-fcc60e40bbfe8a229b8b83f1d1ee77fd4bf870d1.tar.bz2
bpo-40989: Make _PyTraceMalloc_NewReference() internal (GH-20915)
Make the _PyTraceMalloc_NewReference() function fully internal: remove it from the public C API and don't export it anymore.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/object.h4
-rw-r--r--Include/internal/pycore_object.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h
index 304cfbf..ae3920d 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 14444a7..9740717 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) {