Browse Source

Add a compiler flag around uses of the missing CyPythonIDE module

Zrax 14 years ago
parent
commit
daad778557
  1. 10
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp
  2. 6
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.h

10
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.cpp

@ -180,7 +180,7 @@ PyObject* PythonInterface::dbgOut = nil;
PyObject* PythonInterface::dbgSlice = nil; // time slice function for the debug window
plStatusLog* PythonInterface::dbgLog = nil; // output logfile
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
bool PythonInterface::usePythonDebugger = false;
plCyDebServer PythonInterface::debugServer;
bool PythonInterface::requestedExit = false;
@ -189,7 +189,7 @@ bool PythonInterface::requestedExit = false;
// stupid Windows.h and who started including that!
#undef DrawText
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
// Special includes for debugging
#include <frameobject.h>
@ -840,7 +840,7 @@ void PythonInterface::initPython()
Py_SetProgramName("plasma");
Py_Initialize();
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
if (usePythonDebugger)
{
debugServer.SetCallbackClass(&debServerCallback);
@ -1512,7 +1512,7 @@ void PythonInterface::finiPython()
initialized--;
if ( initialized < 1 && Py_IsInitialized() != 0 && IsInShutdown )
{
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
if (usePythonDebugger)
debugServer.Disconnect();
#endif
@ -1659,7 +1659,7 @@ int PythonInterface::getOutputAndReset(std::string *output)
pyOutputRedirector::ClearData(stdOut);
// tell python debugger
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
if (UsePythonDebugger())
PythonInterface::PythonDebugger()->StdOut(strVal);
#endif

6
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfPython/cyPythonInterface.h

@ -34,7 +34,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "hsStlUtils.h"
#include <python.h>
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
#include "../../Apps/CyPythonIDE/plCyDebug/plCyDebServer.h"
#endif
@ -66,7 +66,7 @@ private:
static PyObject* dbgSlice; // time slice function for the debug window
static plStatusLog* dbgLog;
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
static bool usePythonDebugger;
static bool requestedExit;
static plCyDebServer debugServer;
@ -212,7 +212,7 @@ public:
//
static pyKey* GetpyKeyFromPython(PyObject* pkey);
#ifndef PLASMA_EXTERNAL_RELEASE
#if defined(HAVE_CYPYTHONIDE) && !defined(PLASMA_EXTERNAL_RELEASE)
static bool UsePythonDebugger() { return usePythonDebugger; }
static void UsePythonDebugger(bool use) { usePythonDebugger = use; }

Loading…
Cancel
Save