diff options
author | Nick Samarin <nicks1987@bigmir.net> | 2011-06-05 22:51:00 +0400 |
---|---|---|
committer | Nick Samarin <nicks1987@bigmir.net> | 2011-06-05 22:51:00 +0400 |
commit | 5ceb8b3d35706e13580d4eed0f24acc8e57f3464 (patch) | |
tree | 8f7a8078b94bc7512abc37baaadedd7ff5fad7f4 /source/gameengine/GameLogic | |
parent | a918040902bdeb7c9793168710871e4a3b7777a3 (diff) | |
parent | 08f44adba965dbf4f7c56eb096b0e2709df80e5c (diff) |
synched with trunk at revision 37212
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r-- | source/gameengine/GameLogic/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_PythonController.cpp | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt index 2acf07584b1..b6721650bad 100644 --- a/source/gameengine/GameLogic/CMakeLists.txt +++ b/source/gameengine/GameLogic/CMakeLists.txt @@ -34,6 +34,10 @@ set(INC ../../../source/gameengine/Rasterizer ) +set(INC_SYS + +) + set(SRC Joystick/SCA_Joystick.cpp Joystick/SCA_JoystickEvents.cpp @@ -124,9 +128,9 @@ set(SRC ) if(WITH_SDL) - set(INC ${INC} ${SDL_INCLUDE_DIR}) + list(APPEND INC_SYS ${SDL_INCLUDE_DIR}) else() add_definitions(-DDISABLE_SDL) endif() -blender_add_lib(ge_logic "${SRC}" "${INC}") +blender_add_lib(ge_logic "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index d0c1155de96..19ddce13757 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -357,14 +357,7 @@ bool SCA_PythonController::Import() m_function_argc = 0; /* rare cases this could be a function that isnt defined in python, assume zero args */ if (PyFunction_Check(m_function)) { - PyObject *py_arg_count = PyObject_GetAttrString(PyFunction_GET_CODE(m_function), "co_argcount"); - if(py_arg_count) { - m_function_argc = PyLong_AsLong(py_arg_count); - Py_DECREF(py_arg_count); - } - else { - PyErr_Clear(); /* unlikely to fail but just incase */ - } + m_function_argc= ((PyCodeObject *)PyFunction_GET_CODE(m_function))->co_argcount; } if(m_function_argc > 1) { |