code cleanup: remove Python.h include from blenkernel.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 4 Jul 2012 20:13:39 +0000 (20:13 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 4 Jul 2012 20:13:39 +0000 (20:13 +0000)
intern/audaspace/intern/AUD_C-API.cpp
intern/audaspace/intern/AUD_C-API.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/gameengine/Ketsji/KX_SoundActuator.cpp

index 50b476506969a014356a386eec367f19fce66b9f..a7d37da042689279078d4f6f9002ddb552b8a08d 100644 (file)
@@ -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;
index a52a1fa836954cfc5f0434b2d0de8ad15ac021a4..66e6984c71b1ebbf5a7c9ad5b7e4af1e3a576c27 100644 (file)
 #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
index 056a6bf586690b9e9757d077d8a1ed48994a19ff..02f7467f06e2ebcd3d125c8c5b46401f38bcf8af 100644 (file)
@@ -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)
index 64544adb26dbff14d16f26010d2b2edf6e8b0e3d..86124ed932e9c43eacc20a9e1c011c3d82342075 100644 (file)
@@ -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')
index 91f6224e1975e1817e781616783e729902ec7786..db91cea9074f225e319aaa2c5ff98d21bbd66f2d 100644 (file)
@@ -433,7 +433,7 @@ PyObject* KX_SoundActuator::pyattr_get_sound(void *self, const struct KX_PYATTRI
 {
        KX_SoundActuator * actuator = static_cast<KX_SoundActuator *> (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<AUD_IFactory>* snd = reinterpret_cast<AUD_Reference<AUD_IFactory>*>(AUD_getPythonSound(sound));
+       AUD_Reference<AUD_IFactory>* snd = reinterpret_cast<AUD_Reference<AUD_IFactory>*>(AUD_getPythonSound((void *)sound));
        if (snd)
        {
                actuator->m_sound = *snd;