Skip to content

Commit 4e53a83

Browse files
Commit
1 parent 75b1afe commit 4e53a83

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Doc/c-api/init.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ code, or when embedding the Python interpreter:
11131113
This function is safe to call without an :term:`attached thread state`; it
11141114
will simply return ``NULL`` indicating that there was no prior thread state.
11151115
1116-
.. seealso:
1116+
.. seealso::
11171117
:c:func:`PyEval_ReleaseThread`
11181118
11191119
.. note::
@@ -1124,6 +1124,12 @@ code, or when embedding the Python interpreter:
11241124
The following functions use thread-local storage, and are not compatible
11251125
with sub-interpreters:
11261126
1127+
.. c:type:: PyGILState_STATE
1128+
1129+
A handle to the thread state when :c:func:`PyGILState_Ensure` was
1130+
called, and must be passed to :c:func:`PyGILState_Release` to ensure Python
1131+
is left in the same state.
1132+
11271133
.. c:function:: PyGILState_STATE PyGILState_Ensure()
11281134
11291135
Ensure that the current thread is ready to call the Python C API regardless
@@ -1179,7 +1185,7 @@ with sub-interpreters:
11791185
Prefer :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked`
11801186
for most cases.
11811187
1182-
.. seealso: :c:func:`PyThreadState_Get``
1188+
.. seealso:: :c:func:`PyThreadState_Get``
11831189
11841190
.. c:function:: int PyGILState_Check()
11851191
@@ -1278,11 +1284,11 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
12781284
must be :term:`attached <attached thread state>`
12791285
12801286
.. versionchanged:: 3.9
1281-
This function now calls the :c:member:`PyThreadState.on_delete` callback.
1287+
This function now calls the :c:member:`!PyThreadState.on_delete` callback.
12821288
Previously, that happened in :c:func:`PyThreadState_Delete`.
12831289
12841290
.. versionchanged:: 3.13
1285-
The :c:member:`PyThreadState.on_delete` callback was removed.
1291+
The :c:member:`!PyThreadState.on_delete` callback was removed.
12861292
12871293
12881294
.. c:function:: void PyThreadState_Delete(PyThreadState *tstate)

0 commit comments

Comments
 (0)