diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-27 10:05:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-27 10:05:22 +0400 |
commit | 676829ccba10da1d83f809ad243685707bb7543d (patch) | |
tree | 6dc48b011794fe29ebed3f0a8f82425ccdcdacc2 /source/gameengine/Ketsji | |
parent | 27b527c164fcb4b4bd13a1fc49c6627ed460baa6 (diff) |
workaround for python bug [#24400] If Script is executed with TEXT Editor, it becomes an error.
having the blend file as a part of the __file__ variable is not essential, this is fixed in python 3.2 so add an ifdef and don't use the blend file path for py older then 3.2.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 3ffef0db803..b0e631babda 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -36,6 +36,16 @@ #ifndef DISABLE_PYTHON +#ifdef _POSIX_C_SOURCE +#undef _POSIX_C_SOURCE +#endif + +#ifdef _XOPEN_SOURCE +#undef _XOPEN_SOURCE +#endif + +#include <Python.h> + extern "C" { #include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */ #include "py_capi_utils.h" |