@@ -1113,7 +1113,7 @@ code, or when embedding the Python interpreter:
1113
1113
This function is safe to call without an :term:`attached thread state`; it
1114
1114
will simply return ``NULL`` indicating that there was no prior thread state.
1115
1115
1116
- .. seealso:
1116
+ .. seealso::
1117
1117
:c:func:`PyEval_ReleaseThread`
1118
1118
1119
1119
.. note::
@@ -1124,6 +1124,12 @@ code, or when embedding the Python interpreter:
1124
1124
The following functions use thread-local storage, and are not compatible
1125
1125
with sub-interpreters:
1126
1126
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
+
1127
1133
.. c:function:: PyGILState_STATE PyGILState_Ensure()
1128
1134
1129
1135
Ensure that the current thread is ready to call the Python C API regardless
@@ -1179,7 +1185,7 @@ with sub-interpreters:
1179
1185
Prefer :c:func:`PyThreadState_Get` or :c:func:`PyThreadState_GetUnchecked`
1180
1186
for most cases.
1181
1187
1182
- .. seealso: :c:func:`PyThreadState_Get``
1188
+ .. seealso:: :c:func:`PyThreadState_Get``
1183
1189
1184
1190
.. c:function:: int PyGILState_Check()
1185
1191
@@ -1278,11 +1284,11 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
1278
1284
must be :term:`attached <attached thread state>`
1279
1285
1280
1286
.. 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.
1282
1288
Previously, that happened in :c:func:`PyThreadState_Delete`.
1283
1289
1284
1290
.. versionchanged:: 3.13
1285
- The :c:member:`PyThreadState.on_delete` callback was removed.
1291
+ The :c:member:`! PyThreadState.on_delete` callback was removed.
1286
1292
1287
1293
1288
1294
.. c:function:: void PyThreadState_Delete(PyThreadState *tstate)
0 commit comments