Skip to content

Commit 2aba8ba

Browse files
committed
Fix typo in interpreter owner atomic variable
Fixes a typo where the atomic variable `_owners` was incorrectly named and should have been `owners`.
1 parent 55b5fe4 commit 2aba8ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/pystate.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ _finalize_and_free_interpreter(PyInterpreterState *interp)
496496
static inline void
497497
_interp_release_owner(PyInterpreterState *interp)
498498
{
499-
Py_ssize_t prev = _Py_atomic_add_ssize(&interp->_owners, -1);
499+
Py_ssize_t prev = _Py_atomic_add_ssize(&interp->owners, -1);
500500
if (prev == 1) {
501501
_finalize_and_free_interpreter(interp);
502502
}
@@ -551,7 +551,7 @@ init_interpreter(PyInterpreterState *interp,
551551
interp->id = id;
552552

553553
interp->id_refcount = 0;
554-
interp->_owners = 1;
554+
interp->owners = 1;
555555

556556
assert(runtime->interpreters.head == interp);
557557
assert(next != NULL || (interp == runtime->interpreters.main));
@@ -1568,7 +1568,7 @@ new_threadstate(PyInterpreterState *interp, int whence)
15681568
uint64_t id = interp->threads.next_unique_id;
15691569
init_threadstate(tstate, interp, id, whence);
15701570

1571-
_Py_atomic_add_ssize(&interp->_owners, 1);
1571+
_Py_atomic_add_ssize(&interp->owners, 1);
15721572

15731573
// Add the new thread state to the interpreter.
15741574
PyThreadState *old_head = interp->threads.head;

0 commit comments

Comments
 (0)