[Python-checkins] cpython (3.2): #10741: add documentation for PyGILState_GetThisThreadState()
sandro.tosi
python-checkins at python.org
Mon Aug 8 00:20:31 CEST 2011
http://hg.python.org/cpython/rev/53b8260b9ea7
changeset: 71769:53b8260b9ea7
branch: 3.2
parent: 71766:bf4f65043d7d
user: Sandro Tosi <sandro.tosi at gmail.com>
date: Mon Aug 08 00:16:54 2011 +0200
summary:
#10741: add documentation for PyGILState_GetThisThreadState()
files:
Doc/c-api/init.rst | 8 ++++++++
Include/pystate.h | 2 +-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -646,6 +646,14 @@
: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.
diff --git a/Include/pystate.h b/Include/pystate.h
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -195,7 +195,7 @@
/* 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.
*/
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list