File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments