Salome HOME
SAN: Fix for RH8
authorsmh <smh@opencascade.com>
Tue, 31 May 2005 11:03:34 +0000 (11:03 +0000)
committersmh <smh@opencascade.com>
Tue, 31 May 2005 11:03:34 +0000 (11:03 +0000)
src/PyInterp/PyInterp_base.cxx
src/PyInterp/PyInterp_base.h

index 025573557c92e75afd93975447aadec85658fe00..50e2b4ba92507c35574b46857f0956aceddd4ae2 100644 (file)
@@ -17,8 +17,6 @@
 #include <Container_init_python.hxx>
 #include <cStringIO.h>
 
-#include <qmutex.h>
-
 #include <utilities.h>
 
 
@@ -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 "<<this<<"::"<<myMutex<<" - "<<myComment<<" - "<<myMutex->locked());
-  myMutex->lock();
-}
-
-
-ThreadLock::~ThreadLock(){
-//  if(MYDEBUG && myComment != "") MESSAGE("~ThreadLock "<<this<<"::"<<myMutex<<" - "<<myComment);
-  myMutex->unlock();
-}
-
-
-bool IsPyLocked(){
-  return myMutex.locked();
-}
-
-
-ThreadLock GetPyThreadLock(const char* theComment){
-  return ThreadLock(&myMutex,theComment);
-}
-
-
 class PyReleaseLock{
 public:
   ~PyReleaseLock(){
index 233709e5152c2e97c03b36207a373c401e13ccc5..ff39c5a33ece4f255ef3c48b011e4fbe6cc337fc 100644 (file)
 
 #include <Python.h>   // 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;