From 866d8927a5c944c262fd8a7dba8aefa65fd58818 Mon Sep 17 00:00:00 2001 From: smh Date: Tue, 31 May 2005 11:03:34 +0000 Subject: [PATCH] SAN: Fix for RH8 --- src/PyInterp/PyInterp_base.cxx | 30 ------------------------------ src/PyInterp/PyInterp_base.h | 28 ---------------------------- 2 files changed, 58 deletions(-) diff --git a/src/PyInterp/PyInterp_base.cxx b/src/PyInterp/PyInterp_base.cxx index 025573557..50e2b4ba9 100644 --- a/src/PyInterp/PyInterp_base.cxx +++ b/src/PyInterp/PyInterp_base.cxx @@ -17,8 +17,6 @@ #include #include -#include - #include @@ -34,9 +32,6 @@ using namespace std; //#endif -static QMutex myMutex(true); - - PyLockWrapper::PyLockWrapper(PyThreadState* theThreadState): myThreadState(theThreadState), mySaveThreadState(KERNEL_PYTHON::_gtstate) @@ -55,31 +50,6 @@ PyLockWrapper::~PyLockWrapper(){ } -ThreadLock::ThreadLock(QMutex* theMutex, const char* theComment): - myMutex(theMutex), - myComment(theComment) -{ -// if(MYDEBUG && myComment != "") MESSAGE(" ThreadLock "<locked()); - myMutex->lock(); -} - - -ThreadLock::~ThreadLock(){ -// if(MYDEBUG && myComment != "") MESSAGE("~ThreadLock "<unlock(); -} - - -bool IsPyLocked(){ - return myMutex.locked(); -} - - -ThreadLock GetPyThreadLock(const char* theComment){ - return ThreadLock(&myMutex,theComment); -} - - class PyReleaseLock{ public: ~PyReleaseLock(){ diff --git a/src/PyInterp/PyInterp_base.h b/src/PyInterp/PyInterp_base.h index 233709e51..ff39c5a33 100644 --- a/src/PyInterp/PyInterp_base.h +++ b/src/PyInterp/PyInterp_base.h @@ -24,24 +24,11 @@ #include // must be before qt includes ... -class QSemaphore; -class QMutex; - extern "C" PyObject * PyEval_EvalCode(PyObject *co, PyObject *g, PyObject *l); #define TOP_HISTORY_PY "--- top of history ---" #define BEGIN_HISTORY_PY "--- begin of history ---" - -class SemaphoreLock{ - QSemaphore* mySemaphore; - std::string myComment; - public: - SemaphoreLock(QSemaphore* theSemaphore, const char* theComment = ""); - ~SemaphoreLock(); -}; - - class PYINTERP_EXPORT PyLockWrapper { PyThreadState* myThreadState; @@ -52,23 +39,8 @@ class PYINTERP_EXPORT PyLockWrapper }; -class ThreadLock -{ - QMutex* myMutex; - std::string myComment; -public: - ThreadLock(QMutex* theMutex, const char* theComment = ""); - ~ThreadLock(); -}; - - -bool IsPyLocked(); - -ThreadLock GetPyThreadLock(const char* theComment = ""); - class PYINTERP_EXPORT PyInterp_base{ public: -// static PyThreadState *_gtstate; static int _argc; static char* _argv[]; static PyObject *builtinmodule; -- 2.39.2