From 1a6594f66166206b08f24c3ba633c85f86f99a56 Mon Sep 17 00:00:00 2001 From: Sam Gross Date: Mon, 8 Apr 2024 12:11:36 -0400 Subject: gh-117439: Make refleak checking thread-safe without the GIL (#117469) This keeps track of the per-thread total reference count operations in PyThreadState in the free-threaded builds. The count is merged into the interpreter's total when the thread exits. --- Objects/tupleobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/tupleobject.c') diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index d9dc00da368..5ae1ee9a89a 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -946,7 +946,7 @@ _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize) if (sv == NULL) { *pv = NULL; #ifdef Py_REF_DEBUG - _Py_DecRefTotal(_PyInterpreterState_GET()); + _Py_DecRefTotal(_PyThreadState_GET()); #endif PyObject_GC_Del(v); return -1; -- cgit v1.2.3