code.putln("/*--- Threads initialization code ---*/")
code.putln("#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS")
- code.putln("#ifdef WITH_THREAD")
+ code.putln("#ifdef WITH_THREAD /* Python build with threading support? */")
code.putln("PyEval_InitThreads();")
code.putln("#endif")
code.putln("#endif")
py23_init_threads_utility_code = UtilityCode(
proto="""
#ifndef __PYX_FORCE_INIT_THREADS
-#define __PYX_FORCE_INIT_THREADS 0
-#if PY_VERSION_HEX < 0x02040000
-#undef __PYX_FORCE_INIT_THREADS
+#if PY_VERSION_HEX < 0x02040200
#define __PYX_FORCE_INIT_THREADS 1
+#else
+#define __PYX_FORCE_INIT_THREADS 0
#endif
#endif
""")