Skip to content

Commit 3dfade8

Browse files
committed
Fix return description in PyThreadState_Ensure().
1 parent 85559b4 commit 3dfade8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

peps/pep-0788.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,8 @@ replace :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`.
434434
if the interpreter matches *lock*, it is attached, and otherwise a new
435435
thread state is created.
436436
437-
The old thread state is stored as a thread view in *\*thread*, and is
438-
to be restored by :c:func:`PyThreadState_Release`.
439-
440-
Return ``0`` on success, and ``-1`` without an exception set on failure.
437+
Return a non-zero thread view of the old thread state on success, and
438+
``0`` on failure.
441439
442440
.. c:function:: void PyThreadState_Release(PyThreadView lock)
443441

0 commit comments

Comments
 (0)