[Python-checkins] cpython (merge 3.2 -> default): #10741: merge with 3.2

sandro.tosi python-checkins at python.org
Mon Aug 8 00:20:33 CEST 2011


http://hg.python.org/cpython/rev/6adfeec8c482
changeset: 71770:6adfeec8c482
parent: 71767:a7365994f4d6
parent: 71769:53b8260b9ea7
user: Sandro Tosi <sandro.tosi at gmail.com>
date: Mon Aug 08 00:17:43 2011 +0200
summary:
 #10741: merge with 3.2
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
@@ -197,7 +197,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

AltStyle によって変換されたページ (->オリジナル) /