gh-105927: Remove _PyWeakref_GetWeakrefCount() (#106007)

Remove _PyWeakref_GetWeakrefCount() and _PyWeakref_ClearRef() from
the public C API: move them to the internal C API.

Refactor also _weakref_getweakrefs() code to make it more readable.
This commit is contained in:
Victor Stinner 2023-06-23 05:00:56 +02:00 committed by GitHub
parent 7b3ed5b29f
commit 6a80664ef1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 22 deletions

View file

@ -30,6 +30,7 @@
#include "pycore_object.h"
#include "pycore_pyerrors.h"
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_weakref.h" // _PyWeakref_ClearRef()
#include "pydtrace.h"
typedef struct _gc_runtime_state GCState;