Skip to content

Fix typos in pystate.c file #101348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ static void _PyThreadState_Delete(PyThreadState *tstate, int check_current);
//-------------------------------------------------

/*
The stored thread state is set by PyThraedState_Swap().
The stored thread state is set by PyThreadState_Swap().

For each of these functions, the GIL mus be held by the current thread.
For each of these functions, the GIL must be held by the current thread.
*/

static inline PyThreadState *
Expand Down Expand Up @@ -232,7 +232,7 @@ unbind_tstate(PyThreadState *tstate)
current_tss_clear(runtime);
}

// We leave thread_id and native_thraed_id alone
// We leave thread_id and native_thread_id alone
// since they can be useful for debugging.
// Check the `_status` field to know if these values
// are still valid.
Expand Down Expand Up @@ -1140,7 +1140,7 @@ init_threadstate(PyThreadState *tstate,
tstate->exc_info = &tstate->exc_state;

// PyGILState_Release must not try to delete this thread state.
// This is cleared when PyGILState_Ensure() creates the thread sate.
// This is cleared when PyGILState_Ensure() creates the thread state.
tstate->gilstate_counter = 1;

tstate->cframe = &tstate->root_cframe;
Expand Down Expand Up @@ -1220,7 +1220,7 @@ _PyThreadState_Prealloc(PyInterpreterState *interp)
}

// We keep this around for (accidental) stable ABI compatibility.
// Realisically, no extensions are using it.
// Realistically, no extensions are using it.
void
_PyThreadState_Init(PyThreadState *tstate)
{
Expand Down