Skip to content

Commit 44de41e

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 07e2d99 commit 44de41e

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
@@ -499,7 +499,7 @@ _finalize_and_free_interpreter(PyInterpreterState *interp)
499499
static inline void
500500
_interp_release_owner(PyInterpreterState *interp)
501501
{
502-
Py_ssize_t prev = _Py_atomic_add_ssize(&interp->_owners, -1);
502+
Py_ssize_t prev = _Py_atomic_add_ssize(&interp->owners, -1);
503503
if (prev == 1) {
504504
_finalize_and_free_interpreter(interp);
505505
}
@@ -554,7 +554,7 @@ init_interpreter(PyInterpreterState *interp,
554554
interp->id = id;
555555

556556
interp->id_refcount = 0;
557-
interp->_owners = 1;
557+
interp->owners = 1;
558558

559559
assert(runtime->interpreters.head == interp);
560560
assert(next != NULL || (interp == runtime->interpreters.main));
@@ -1571,7 +1571,7 @@ new_threadstate(PyInterpreterState *interp, int whence)
15711571
uint64_t id = interp->threads.next_unique_id;
15721572
init_threadstate(tstate, interp, id, whence);
15731573

1574-
_Py_atomic_add_ssize(&interp->_owners, 1);
1574+
_Py_atomic_add_ssize(&interp->owners, 1);
15751575

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

0 commit comments

Comments
 (0)