]> granicus.if.org Git - python/commitdiff
pystate.h: fix _PyThreadState_UncheckedGet()
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 24 Mar 2016 23:54:18 +0000 (00:54 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 24 Mar 2016 23:54:18 +0000 (00:54 +0100)
Declare the function even if thread support is disabled.

Include/pystate.h

index b50b16b39c0a09a03b515bcef2e22994b1228472..0499a74280d0fa3d71a5d45c002be4a9d5850036 100644 (file)
@@ -173,11 +173,9 @@ PyAPI_FUNC(void) _PyGILState_Reinit(void);
  * the caller needn't check for NULL). */
 PyAPI_FUNC(PyThreadState *) PyThreadState_Get(void);
 
-#ifdef WITH_THREAD
 /* Similar to PyThreadState_Get(), but don't issue a fatal error
  * if it is NULL. */
 PyAPI_FUNC(PyThreadState *) _PyThreadState_UncheckedGet(void);
-#endif
 
 PyAPI_FUNC(PyThreadState *) PyThreadState_Swap(PyThreadState *);
 PyAPI_FUNC(PyObject *) PyThreadState_GetDict(void);