diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-19 00:39:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-19 00:39:50 +0300 |
commit | 3b0c2accc66a2366905a617a280fa79711e8d276 (patch) | |
tree | ff597f221fa9878aa114f6d4572ede0c123e37d9 /source/gameengine | |
parent | 7d675b15fb3ead4d10f1a2abd7eb39c2e5d8068c (diff) |
support building with python3.2
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/GameLogic/SCA_PythonController.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index 109b199f230..b6671c45d7d 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -408,7 +408,13 @@ void SCA_PythonController::Trigger(SCA_LogicManager* logicmgr) */ excdict= PyDict_Copy(m_pythondictionary); - resultobj = PyEval_EvalCode((PyCodeObject*)m_bytecode, excdict, excdict); + +#if PY_VERSION_HEX >= 0x03020000 + resultobj = PyEval_EvalCode((PyObject *)m_bytecode, excdict, excdict); +#else + resultobj = PyEval_EvalCode((PyCodeObject *)m_bytecode, excdict, excdict); +#endif + /* PyRun_SimpleString(m_scriptText.Ptr()); */ break; } |