Skip to content

Commit 7a6cc0c

Browse files
committed
Fix typos.
1 parent 59e2d9a commit 7a6cc0c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/c-api/threads.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ For example::
219219

220220
// Create a new thread state for the interpreter.
221221
PyThreadStateToken *token = PyThreadState_Ensure(guard);
222-
if (tstate == NULL) {
222+
if (token == NULL) {
223223
PyInterpreterGuard_Close(guard);
224224
return;
225225
}
@@ -228,9 +228,9 @@ For example::
228228
result = CallSomeFunction();
229229
// Evaluate result or handle exceptions.
230230

231-
// Release the thread state. No calsl to the C API are allowed beyond this
231+
// Release the thread state. No calls to the C API are allowed beyond this
232232
// point.
233-
PyThreadState_Release(tstate);
233+
PyThreadState_Release(token);
234234
PyInterpreterGuard_Close(guard);
235235

236236

@@ -339,7 +339,7 @@ Attaching/detaching thread states
339339
340340
.. c:type:: PyThreadStateToken
341341
342-
An opaque token retreived from a :c:func:`PyThreadState_Ensure` call
342+
An opaque token retrieved from a :c:func:`PyThreadState_Ensure` call
343343
and passed to a corresponding :c:func:`PyThreadState_Release` call.
344344
345345

0 commit comments

Comments
 (0)