From 0876fce0094ad3e37be4b197ef8850757eacd37b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 31 Oct 2010 04:11:39 +0000 Subject: rename and negate DISABLE_PYTHON --> WITH_PYTHON --- intern/audaspace/CMakeLists.txt | 3 +-- intern/audaspace/SConscript | 3 +-- intern/audaspace/intern/AUD_C-API.cpp | 8 ++++---- intern/audaspace/intern/AUD_PyInit.h | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) (limited to 'intern/audaspace') diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt index 2dd4694d8a9..be39a7348aa 100644 --- a/intern/audaspace/CMakeLists.txt +++ b/intern/audaspace/CMakeLists.txt @@ -178,8 +178,7 @@ IF(WITH_PYTHON) SET(PYTHONSRC Python/AUD_PyAPI.cpp ) -ELSE(WITH_PYTHON) - ADD_DEFINITIONS(-DDISABLE_PYTHON) + ADD_DEFINITIONS(-DWITH_PYTHON) ENDIF(WITH_PYTHON) SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${FFTW3SRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC} ${PYTHONSRC}) diff --git a/intern/audaspace/SConscript b/intern/audaspace/SConscript index 7230bffebdc..2c86849bc62 100644 --- a/intern/audaspace/SConscript +++ b/intern/audaspace/SConscript @@ -39,8 +39,7 @@ if env['WITH_BF_SNDFILE']: if env['WITH_BF_PYTHON']: sources += env.Glob('Python/*.cpp') incs += ' Python ' + env['BF_PYTHON_INC'] -else: - defs.append('DISABLE_PYTHON') + defs.append('WITH_PYTHON') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp index 38732fc13e1..1dd0ab1ac95 100644 --- a/intern/audaspace/intern/AUD_C-API.cpp +++ b/intern/audaspace/intern/AUD_C-API.cpp @@ -28,7 +28,7 @@ #define __STDC_CONSTANT_MACROS #endif -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "AUD_PyInit.h" #include "AUD_PyAPI.h" @@ -141,7 +141,7 @@ int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize) AUD_device = dev; AUD_3ddevice = dynamic_cast(AUD_device); -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if(g_pyinitialized) { g_device = (Device*)Device_empty(); @@ -162,7 +162,7 @@ int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize) void AUD_exit() { -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON if(g_device) { Py_XDECREF(g_device); @@ -176,7 +176,7 @@ void AUD_exit() AUD_3ddevice = NULL; } -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON static PyObject* AUD_getCDevice(PyObject* self) { if(g_device) diff --git a/intern/audaspace/intern/AUD_PyInit.h b/intern/audaspace/intern/AUD_PyInit.h index bd67259449a..0b80b3a9ae1 100644 --- a/intern/audaspace/intern/AUD_PyInit.h +++ b/intern/audaspace/intern/AUD_PyInit.h @@ -26,7 +26,7 @@ #ifndef AUD_PYINIT #define AUD_PYINIT -#ifndef DISABLE_PYTHON +#ifdef WITH_PYTHON #include "Python.h" #ifdef __cplusplus -- cgit v1.2.3