File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -1225,9 +1225,23 @@ code, or when embedding the Python interpreter:
12251225 The :term:`GIL` does not need to be held, but will be held upon returning
12261226 if *tstate* is non-``NULL``.
12271227
1228+
12281229The following functions use thread-local storage, and are not compatible
12291230with sub-interpreters:
12301231
1232+ .. c:type:: PyGILState_STATE
1233+
1234+ The type of the value returned by :c:func:`PyGILState_Ensure` and passed to
1235+ :c:func:`PyGILState_Release`.
1236+
1237+ .. c:enumerator:: PyGILState_LOCKED
1238+
1239+ The GIL was already held when :c:func:`PyGILState_Ensure` was called.
1240+
1241+ .. c:enumerator:: PyGILState_UNLOCKED
1242+
1243+ The GIL was not held when :c:func:`PyGILState_Ensure` was called.
1244+
12311245.. c:function:: PyGILState_STATE PyGILState_Ensure()
12321246
12331247 Ensure that the current thread is ready to call the Python C API regardless
@@ -1372,11 +1386,11 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
13721386 must be held.
13731387
13741388 .. versionchanged:: 3.9
1375- This function now calls the :c:member:`PyThreadState.on_delete` callback.
1389+ This function now calls the :c:member:`! PyThreadState.on_delete` callback.
13761390 Previously, that happened in :c:func:`PyThreadState_Delete`.
13771391
13781392 .. versionchanged:: 3.13
1379- The :c:member:`PyThreadState.on_delete` callback was removed.
1393+ The :c:member:`! PyThreadState.on_delete` callback was removed.
13801394
13811395
13821396.. c:function:: void PyThreadState_Delete(PyThreadState *tstate)
Original file line number Diff line number Diff line change 44
55Doc/c-api/descriptor.rst
66Doc/c-api/float.rst
7- Doc/c-api/init.rst
87Doc/c-api/init_config.rst
98Doc/c-api/intro.rst
109Doc/c-api/module.rst
You can’t perform that action at this time.
0 commit comments