summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro Tosi <sandro.tosi@gmail.com>2011-08-07 22:17:43 (GMT)
committerSandro Tosi <sandro.tosi@gmail.com>2011-08-07 22:17:43 (GMT)
commit1e8d8fd01d934fc610a6d37384f7e7718b1682f0 (patch)
treea43c5b9766afa98bb9af91998cd84664ff04d676
parentc42a568cd4f3708b30eee733a132029df1808d10 (diff)
parent61baee0ee7c5183c80809e9b44da2542c682c235 (diff)
downloadcpython-1e8d8fd01d934fc610a6d37384f7e7718b1682f0.zip
cpython-1e8d8fd01d934fc610a6d37384f7e7718b1682f0.tar.gz
cpython-1e8d8fd01d934fc610a6d37384f7e7718b1682f0.tar.bz2
#10741: merge with 3.2
-rw-r--r--Doc/c-api/init.rst8
-rw-r--r--Include/pystate.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index 1806867..4b70ec2 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -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.
diff --git a/Include/pystate.h b/Include/pystate.h
index 1b0f099..1bbb4e2 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -197,7 +197,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.
*/