]> granicus.if.org Git - python/commitdiff
#10741: add documentation for PyGILState_GetThisThreadState()
authorSandro Tosi <sandro.tosi@gmail.com>
Sun, 7 Aug 2011 22:15:57 +0000 (00:15 +0200)
committerSandro Tosi <sandro.tosi@gmail.com>
Sun, 7 Aug 2011 22:15:57 +0000 (00:15 +0200)
Doc/c-api/init.rst
Include/pystate.h

index 9354e3c6da9107ca6ed139a1e1ebff83da607cc7..996ab78d78215b8e6727a10c14e563f0109c802a 100644 (file)
@@ -638,6 +638,16 @@ with sub-interpreters:
    .. versionadded:: 2.3
 
 
+.. 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.
+
+   .. versionadded:: 2.3
+
+
 The following macros are normally used without a trailing semicolon; look for
 example usage in the Python source distribution.
 
index 729342ccbd155f3a238db86640b11ad211e56b16..63371fac00f7c7a941499824b1c0451e370fc8ad 100644 (file)
@@ -169,7 +169,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.
 */