summaryrefslogtreecommitdiffstats
path: root/Objects/weakrefobject.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-05-02 01:36:00 (GMT)
committerGitHub <noreply@github.com>2023-05-02 01:36:00 (GMT)
commitfdd878650d325297cd801305bc2d1b0e903e42b4 (patch)
tree9814f09627ef014852dcc3fa462dfec30e5e591d /Objects/weakrefobject.c
parentb1ca34d4d5e463b8108eea20090f12292390f0cf (diff)
downloadcpython-fdd878650d325297cd801305bc2d1b0e903e42b4.zip
cpython-fdd878650d325297cd801305bc2d1b0e903e42b4.tar.gz
cpython-fdd878650d325297cd801305bc2d1b0e903e42b4.tar.bz2
gh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (gh-104072)
Until now, we haven't been initializing nor finalizing the per-interpreter state properly.
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r--Objects/weakrefobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index c1afe63..aee79fc 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -1017,9 +1017,9 @@ PyObject_ClearWeakRefs(PyObject *object)
* or anything else.
*/
void
-_PyStaticType_ClearWeakRefs(PyTypeObject *type)
+_PyStaticType_ClearWeakRefs(PyInterpreterState *interp, PyTypeObject *type)
{
- static_builtin_state *state = _PyStaticType_GetState(type);
+ static_builtin_state *state = _PyStaticType_GetState(interp, type);
PyObject **list = _PyStaticType_GET_WEAKREFS_LISTPTR(state);
while (*list != NULL) {
/* Note that clear_weakref() pops the first ref off the type's