diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp index 50b47650696..a7d37da0426 100644 --- a/intern/audaspace/intern/AUD_C-API.cpp +++ b/intern/audaspace/intern/AUD_C-API.cpp @@ -244,7 +244,7 @@ PyObject* AUD_initPython() return module; } -PyObject* AUD_getPythonFactory(AUD_Sound* sound) +void* AUD_getPythonFactory(AUD_Sound* sound) { if(sound) { @@ -259,9 +259,9 @@ PyObject* AUD_getPythonFactory(AUD_Sound* sound) return NULL; } -AUD_Sound* AUD_getPythonSound(PyObject* sound) +AUD_Sound* AUD_getPythonSound(void* sound) { - Factory* factory = checkFactory(sound); + Factory* factory = checkFactory((PyObject *)sound); if(!factory) return NULL; diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h index a52a1fa8369..66e6984c71b 100644 --- a/intern/audaspace/intern/AUD_C-API.h +++ b/intern/audaspace/intern/AUD_C-API.h @@ -29,10 +29,6 @@ #ifndef __AUD_C_API_H__ #define __AUD_C_API_H__ -#ifdef WITH_PYTHON -#include "Python.h" -#endif - #ifdef __cplusplus extern "C" { #endif @@ -740,14 +736,14 @@ extern AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* seque * \param sound The sound factory. * \return The python factory. */ -extern PyObject* AUD_getPythonFactory(AUD_Sound* sound); +extern void* AUD_getPythonFactory(AUD_Sound* sound); /** * Retrieves the sound factory of a python factory. * \param sound The python factory. * \return The sound factory. */ -extern AUD_Sound* AUD_getPythonSound(PyObject* sound); +extern AUD_Sound* AUD_getPythonSound(void* sound); #endif #ifdef __cplusplus diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 056a6bf5866..02f7467f06e 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -317,9 +317,6 @@ if(WITH_PYTHON) list(APPEND INC ../python ) - list(APPEND INC_SYS - ${PYTHON_INCLUDE_DIRS} - ) add_definitions(-DWITH_PYTHON) if(WITH_PYTHON_SECURITY) diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 64544adb26d..86124ed932e 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -32,7 +32,6 @@ if env['WITH_BF_FRAMESERVER']: if env['WITH_BF_PYTHON']: incs += ' ../python' - incs += ' ' + env['BF_PYTHON_INC'] defs.append('WITH_PYTHON') if env['BF_DEBUG']: defs.append('DEBUG') diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 91f6224e197..db91cea9074 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -433,7 +433,7 @@ PyObject* KX_SoundActuator::pyattr_get_sound(void *self, const struct KX_PYATTRI { KX_SoundActuator * actuator = static_cast (self); if (!actuator->m_sound.isNull()) - return AUD_getPythonFactory(&actuator->m_sound); + return (PyObject *)AUD_getPythonFactory(&actuator->m_sound); else Py_RETURN_NONE; } @@ -547,7 +547,7 @@ int KX_SoundActuator::pyattr_set_sound(void *self, const struct KX_PYATTRIBUTE_D if (!PyArg_Parse(value, "O", &sound)) return PY_SET_ATTR_FAIL; - AUD_Reference* snd = reinterpret_cast*>(AUD_getPythonSound(sound)); + AUD_Reference* snd = reinterpret_cast*>(AUD_getPythonSound((void *)sound)); if (snd) { actuator->m_sound = *snd;