mirror of
https://github.com/python/cpython.git
synced 2025-09-11 03:07:01 +00:00
[3.13] gh-118789: Restore hidden _PyWeakref_ClearRef
(GH-118797) (GH-118903)
gh-118789: Restore hidden `_PyWeakref_ClearRef` (GH-118797)
_PyWeakref_ClearRef was previously exposed in the public C-API, although
it begins with an underscore and is not documented. It's used by a few
C-API extensions. There is currently no alternative public API that can
replace its use.
_PyWeakref_ClearWeakRefsExceptCallbacks is the only thread-safe way to
use _PyWeakref_ClearRef in the free-threaded build. This exposes the C
symbol, but does not make the API public.
(cherry picked from commit db5af7da09
)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
93fce2dcd5
commit
bb5bf24226
3 changed files with 4 additions and 2 deletions
|
@ -111,8 +111,6 @@ extern Py_ssize_t _PyWeakref_GetWeakrefCount(PyObject *obj);
|
|||
// intact.
|
||||
extern void _PyWeakref_ClearWeakRefsExceptCallbacks(PyObject *obj);
|
||||
|
||||
extern void _PyWeakref_ClearRef(PyWeakReference *self);
|
||||
|
||||
PyAPI_FUNC(int) _PyWeakref_IsDead(PyObject *weakref);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue