From 44a852be151838dc4c4366ea0025d56ae5fb129b Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Tue, 14 Apr 2026 09:35:03 -0400 Subject: [PATCH] PEP 788: Minor editorial fixes --- peps/pep-0788.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/peps/pep-0788.rst b/peps/pep-0788.rst index bdfcaee1ca5..7f3c6105c73 100644 --- a/peps/pep-0788.rst +++ b/peps/pep-0788.rst @@ -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 @@ -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); @@ -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; }