From 7e41c9f191f0ed8a207f0851da11d160d145b8be Mon Sep 17 00:00:00 2001 From: abd Date: Fri, 31 Mar 2006 10:32:01 +0000 Subject: [PATCH] Update executive version Temprorary fix python of calls --- src/PyInterp/PyInterp.h | 18 ++++++++++-------- src/PythonConsole/PythonConsole.h | 16 +++++++++------- src/PythonConsole/PythonConsole_PyInterp.cxx | 15 +++++++++++---- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/PyInterp/PyInterp.h b/src/PyInterp/PyInterp.h index fe7ec6917..06a4cb6e5 100755 --- a/src/PyInterp/PyInterp.h +++ b/src/PyInterp/PyInterp.h @@ -36,18 +36,20 @@ #endif // WNT // ======================================================== -// little trick - we do not have debug python libraries +// little trick - if we do not have debug python libraries #ifdef _DEBUG - -#undef _DEBUG -#include -#define _DEBUG - -#else // _DEBUG + #ifndef HAVE_DEBUG_PYTHON + #undef _DEBUG + #endif +#endif #include -#endif // _DEBUG +#ifdef _DEBUG + #ifndef HAVE_DEBUG_PYTHON + #define _DEBUG + #endif +#endif // ======================================================== // avoid warning messages diff --git a/src/PythonConsole/PythonConsole.h b/src/PythonConsole/PythonConsole.h index 1e6f954ca..3680d4c21 100755 --- a/src/PythonConsole/PythonConsole.h +++ b/src/PythonConsole/PythonConsole.h @@ -36,18 +36,20 @@ #endif // WNT // ======================================================== -// little trick - we do not have debug python libraries +// little trick - if we do not have debug python libraries #ifdef _DEBUG - +#ifndef HAVE_DEBUG_PYTHON #undef _DEBUG -#include -#define _DEBUG - -#else // _DEBUG +#endif +#endif #include -#endif // _DEBUG +#ifdef _DEBUG +#ifndef HAVE_DEBUG_PYTHON +#define _DEBUG +#endif +#endif // ======================================================== // avoid warning messages diff --git a/src/PythonConsole/PythonConsole_PyInterp.cxx b/src/PythonConsole/PythonConsole_PyInterp.cxx index 5b7d3e579..22a84bfc4 100755 --- a/src/PythonConsole/PythonConsole_PyInterp.cxx +++ b/src/PythonConsole/PythonConsole_PyInterp.cxx @@ -77,9 +77,16 @@ bool PythonConsole_PyInterp::initState() * It is the caller responsability to release the lock if needed */ PyEval_AcquireLock(); - _tstate = Py_NewInterpreter(); // create an interpreter and save current state - PySys_SetArgv(PyInterp_base::_argc,PyInterp_base::_argv); // initialize sys.argv -// if(MYDEBUG) MESSAGE("PythonConsole_PyInterp::initState - this = "<