]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#10741: add documentation for PyGILState_GetThisThreadState()
authorSandro Tosi <sandro.tosi@gmail.com>
Sun, 7 Aug 2011 22:16:54 +0000 (00:16 +0200)
committerSandro Tosi <sandro.tosi@gmail.com>
Sun, 7 Aug 2011 22:16:54 +0000 (00:16 +0200)
Doc/c-api/init.rst
Include/pystate.h

index 1806867e5e190acbd420ab73e92655d6ed821c8f..4b70ec29a4e971e3beb6a7a8092366799c7aec30 100644 (file)
@@ -646,6 +646,14 @@ with sub-interpreters:
    :c:func:`PyGILState_Release` on the same thread.
 
 
+.. c:function:: PyThreadState PyGILState_GetThisThreadState()
+
+   Get the current thread state for this thread.  May return ``NULL`` if no
+   GILState API has been used on the current thread.  Note that the main thread
+   always has such a thread-state, even if no auto-thread-state call has been
+   made on the main thread.  This is mainly a helper/diagnostic function.
+
+
 The following macros are normally used without a trailing semicolon; look for
 example usage in the Python source distribution.
 
index 5d2ee633fdf56dab9b277b2fb0191d5e9fc7eaab..b5fe1adddcf506fa868102f456e40cda6f1ad5fa 100644 (file)
@@ -195,7 +195,7 @@ PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE);
 
 /* Helper/diagnostic function - get the current thread state for
    this thread.  May return NULL if no GILState API has been used
-   on the current thread.  Note the main thread always has such a
+   on the current thread.  Note that the main thread always has such a
    thread-state, even if no auto-thread-state call has been made
    on the main thread.
 */