Skip to content
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
5 changes: 2 additions & 3 deletions peps/pep-0788.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Interpreter guards
The caller does not need to hold an attached thread state.


.. c:function:: void PyInterpreterGuard_Close(PyInterpreterGuard guard)
.. c:function:: void PyInterpreterGuard_Close(PyInterpreterGuard *guard)

Close an interpreter guard, allowing the interpreter to enter
finalization if no other guards remain. If an interpreter guard
Expand Down Expand Up @@ -377,7 +377,7 @@ replace :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`.

PyThreadState *tstate = PyThreadState_Ensure(guard);
if (tstate == NULL) {
PyInterpreterGuard_Close(tstate);
PyInterpreterGuard_Close(guard);
return NULL;
}
close_guard_upon_tstate_release(tstate, guard);
Expand Down Expand Up @@ -595,7 +595,6 @@ With this PEP, you would implement it like this:
assert(view != NULL);
PyThreadState *tstate = PyThreadState_EnsureFromView(view);
if (tstate == NULL) {
PyInterpreterGuard_Close(guard);
fputs("Cannot call Python.\n", stderr);
return -1;
}
Expand Down
Loading