aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-04-08 12:11:36 -0400
committerGitHub <noreply@github.com>2024-04-08 12:11:36 -0400
commit1a6594f66166206b08f24c3ba633c85f86f99a56 (patch)
tree961c4d6e2f694e482636643993cd17ebbf9ea2fd /Objects/unicodeobject.c
parent2067da25796ea3254d0edf61a39bcc0326c4f71d (diff)
downloadcpython-1a6594f66166206b08f24c3ba633c85f86f99a56.tar.gz
cpython-1a6594f66166206b08f24c3ba633c85f86f99a56.zip
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.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index e135638c696..59b350f0a60 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -14916,7 +14916,7 @@ _PyUnicode_InternInPlace(PyInterpreterState *interp, PyObject **p)
decrements to these objects will not be registered so they
need to be accounted for in here. */
for (Py_ssize_t i = 0; i < Py_REFCNT(s) - 2; i++) {
- _Py_DecRefTotal(_PyInterpreterState_GET());
+ _Py_DecRefTotal(_PyThreadState_GET());
}
#endif
_Py_SetImmortal(s);