Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-05 00:13:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-05 00:13:39 +0400
commit21bf13989f0a38d56dbe98334e9503623a976ea2 (patch)
tree735ab5bbc13a1dd32bd7c0f2d7099d2f92affeb5
parent6e97ecee00bef36fa21fd60a53271d651d43c2e0 (diff)
code cleanup: remove Python.h include from blenkernel.
-rw-r--r--intern/audaspace/intern/AUD_C-API.cpp6
-rw-r--r--intern/audaspace/intern/AUD_C-API.h8
-rw-r--r--source/blender/blenkernel/CMakeLists.txt3
-rw-r--r--source/blender/blenkernel/SConscript1
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.cpp4
5 files changed, 7 insertions, 15 deletions
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<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;