File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ Interpreter guards
205205 The caller does not need to hold an attached thread state.
206206
207207
208- .. c :function :: void PyInterpreterGuard_Close (PyInterpreterGuard guard)
208+ .. c :function :: void PyInterpreterGuard_Close (PyInterpreterGuard * guard)
209209
210210 Close an interpreter guard, allowing the interpreter to enter
211211 finalization if no other guards remain. If an interpreter guard
@@ -377,7 +377,7 @@ replace :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`.
377377
378378 PyThreadState *tstate = PyThreadState_Ensure(guard);
379379 if (tstate == NULL) {
380- PyInterpreterGuard_Close(tstate );
380+ PyInterpreterGuard_Close(guard );
381381 return NULL;
382382 }
383383 close_guard_upon_tstate_release(tstate, guard);
@@ -595,7 +595,6 @@ With this PEP, you would implement it like this:
595595 assert(view != NULL);
596596 PyThreadState *tstate = PyThreadState_EnsureFromView(view);
597597 if (tstate == NULL) {
598- PyInterpreterGuard_Close(guard);
599598 fputs("Cannot call Python.\n", stderr);
600599 return -1;
601600 }
You can’t perform that action at this time.
0 commit comments