Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(37432)

Unified Diff: Include/pystate.h

Issue 10915: Make the PyGILState API compatible with multiple interpreters
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Modules/_ctypes/callbacks.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Include/pystate.h
===================================================================
--- Include/pystate.h (révision 88020)
+++ Include/pystate.h (copie de travail)
@@ -38,7 +38,10 @@
#ifdef WITH_TSC
int tscdump;
#endif
-
+ /* For PyGILState_* APIs */
+#ifdef WITH_THREAD
+ int auto_tls_key;
+#endif
} PyInterpreterState;
#endif
@@ -126,7 +129,7 @@
PyAPI_FUNC(PyThreadState *) PyThreadState_New(PyInterpreterState *);
PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *);
-PyAPI_FUNC(void) _PyThreadState_Init(PyThreadState *);
+PyAPI_FUNC(void) _PyThreadState_Init(PyInterpreterState *, PyThreadState *);
PyAPI_FUNC(void) PyThreadState_Clear(PyThreadState *);
PyAPI_FUNC(void) PyThreadState_Delete(PyThreadState *);
#ifdef WITH_THREAD
@@ -180,6 +183,7 @@
Failure is a fatal error.
*/
PyAPI_FUNC(PyGILState_STATE) PyGILState_Ensure(void);
+PyAPI_FUNC(PyGILState_STATE) PyGILState_EnsureEx(PyInterpreterState *);
/* Release any resources previously acquired. After this call, Python's
state will be the same as it was prior to the corresponding
@@ -190,6 +194,7 @@
PyGILState_Release on the same thread.
*/
PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE);
+PyAPI_FUNC(void) PyGILState_ReleaseEx(PyInterpreterState *, PyGILState_STATE);
/* Helper/diagnostic function - get the current thread state for
this thread. May return NULL if no GILState API has been used
@@ -198,6 +203,7 @@
on the main thread.
*/
PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadState(void);
+PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadStateEx(PyInterpreterState *);
/* The implementation of sys._current_frames() Returns a dict mapping
thread id to that thread's current frame.
« no previous file with comments | « no previous file | Modules/_ctypes/callbacks.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+