[Python-checkins] cpython (2.7): #10741: add documentation for PyGILState_GetThisThreadState()
sandro.tosi
python-checkins at python.org
Mon Aug 8 00:20:30 CEST 2011
http://hg.python.org/cpython/rev/8852e4a9aa1e
changeset: 71768:8852e4a9aa1e
branch: 2.7
parent: 71765:a30e6c4bf486
user: Sandro Tosi <sandro.tosi at gmail.com>
date: Mon Aug 08 00:15:57 2011 +0200
summary:
#10741: add documentation for PyGILState_GetThisThreadState()
files:
Doc/c-api/init.rst | 10 ++++++++++
Include/pystate.h | 2 +-
2 files changed, 11 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
@@ -638,6 +638,16 @@
.. 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.
diff --git a/Include/pystate.h b/Include/pystate.h
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -169,7 +169,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