mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-106320: Don't export _Py_ForgetReference() function (#108712)
There is no need to export the _Py_ForgetReference() function of the Py_TRACE_REFS build. It's not used by shared extensions. Enhance also its comment.
This commit is contained in:
parent
9c03215a3e
commit
194c6fb85e
1 changed files with 8 additions and 2 deletions
|
|
@ -32,8 +32,14 @@ extern void _PyDebugAllocatorStats(FILE *out, const char *block_name,
|
||||||
extern void _PyObject_DebugTypeStats(FILE *out);
|
extern void _PyObject_DebugTypeStats(FILE *out);
|
||||||
|
|
||||||
#ifdef Py_TRACE_REFS
|
#ifdef Py_TRACE_REFS
|
||||||
/* Py_TRACE_REFS is such major surgery that we call external routines. */
|
// Forget a reference registered by _Py_NewReference(). Function called by
|
||||||
PyAPI_FUNC(void) _Py_ForgetReference(PyObject *);
|
// _Py_Dealloc().
|
||||||
|
//
|
||||||
|
// On a free list, the function can be used before modifying an object to
|
||||||
|
// remove the object from traced objects. Then _Py_NewReference() or
|
||||||
|
// _Py_NewReferenceNoTotal() should be called again on the object to trace
|
||||||
|
// it again.
|
||||||
|
extern void _Py_ForgetReference(PyObject *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Export for shared _testinternalcapi extension
|
// Export for shared _testinternalcapi extension
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue