Skip to content

Commit 54601f4

Browse files
PEP 788: Minor editorial fixes (#4909)
1 parent 40a3e79 commit 54601f4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

peps/pep-0788.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)