File blender-2.57b-PYC_INTERPRETER_ACTIVE.patch of Package blender
Index: source/blender/python/generic/py_capi_utils.c
===================================================================
--- source/blender/python/generic/py_capi_utils.c.orig 2011-05-11 02:31:31.000000000 +0200
+++ source/blender/python/generic/py_capi_utils.c 2011-05-11 10:26:11.826560191 +0200
@@ -36,7 +36,11 @@
#include "BLI_path_util.h"
#endif
+#if PY_VERSION_HEX < 0x03020000 /* _Py_atomic_load_relaxed only exists in py 3.2*/
+#define PYC_INTERPRETER_ACTIVE ((_PyThreadState_GET()) != NULL)
+#else
#define PYC_INTERPRETER_ACTIVE (((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current)) != NULL)
+#endif
/* for debugging */
void PyC_ObSpit(const char *name, PyObject *var) {