[wpdev-commits] wolfpack/python engine.cpp,1.15,1.16 global.cpp,1.87,1.88
Brought to you by:
rip,
thiagocorrea
|
From: <dar...@us...> - 2003-09-09 00:26:52
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv23381/python
Modified Files:
engine.cpp global.cpp
Log Message:
Trying out new console code.
Index: engine.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/engine.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** engine.cpp 12 Jun 2003 02:19:39 -0000 1.15
--- engine.cpp 8 Sep 2003 10:58:47 -0000 1.16
***************
*** 31,35 ****
#include "engine.h"
! #include "../wpconsole.h"
#include "../globals.h"
--- 31,35 ----
#include "engine.h"
! #include "../console.h"
#include "../globals.h"
***************
*** 62,66 ****
{
if( !silent )
! clConsole.PrepareProgress( "Starting Python interpreter" );
Py_SetProgramName( argv[ 0 ] );
--- 62,66 ----
{
if( !silent )
! Console::instance()->PrepareProgress( "Starting Python interpreter" );
Py_SetProgramName( argv[ 0 ] );
***************
*** 82,87 ****
{
if( !silent )
! clConsole.ProgressSkip();
! clConsole.send( "Unable to open python.xml!\n" );
return;
}
--- 82,87 ----
{
if( !silent )
! Console::instance()->ProgressSkip();
! Console::instance()->send( "Unable to open python.xml!\n" );
return;
}
***************
*** 91,96 ****
if( !silent )
! clConsole.ProgressSkip();
! clConsole.send( "Unable to parse python.xml" );
return;
--- 91,96 ----
if( !silent )
! Console::instance()->ProgressSkip();
! Console::instance()->send( "Unable to parse python.xml" );
return;
***************
*** 121,125 ****
if( m == NULL )
{
! clConsole.ProgressFail();
if( PyErr_Occurred() )
PyErr_Print();
--- 121,125 ----
if( m == NULL )
{
! Console::instance()->ProgressFail();
if( PyErr_Occurred() )
PyErr_Print();
***************
*** 139,149 ****
{
if( !silent )
! clConsole.ProgressFail();
! clConsole.send( "Failed to initialize the python extension modules\n" );
return;
}
if( !silent )
! clConsole.ProgressDone();
}
--- 139,149 ----
{
if( !silent )
! Console::instance()->ProgressFail();
! Console::instance()->send( "Failed to initialize the python extension modules\n" );
return;
}
if( !silent )
! Console::instance()->ProgressDone();
}
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** global.cpp 5 Sep 2003 20:21:32 -0000 1.87
--- global.cpp 8 Sep 2003 10:58:48 -0000 1.88
***************
*** 34,38 ****
#include "../network/uosocket.h"
#include "../network/uotxpackets.h"
! #include "../wpconsole.h"
#include "../TmpEff.h"
#include "../sectors.h"
--- 34,38 ----
#include "../network/uosocket.h"
#include "../network/uotxpackets.h"
! #include "../console.h"
#include "../TmpEff.h"
#include "../sectors.h"
***************
*** 134,138 ****
return PyFalse;
! clConsole.send( PyString_AS_STRING( pyMessage ) );
return PyTrue;
--- 134,138 ----
return PyFalse;
! Console::instance()->send( PyString_AS_STRING( pyMessage ) );
return PyTrue;
***************
*** 153,157 ****
return PyFalse;
! clConsole.PrepareProgress( PyString_AS_STRING( pyMessage ) );
return PyInt_FromLong( 1 );
--- 153,157 ----
return PyFalse;
! Console::instance()->PrepareProgress( PyString_AS_STRING( pyMessage ) );
return PyInt_FromLong( 1 );
***************
*** 165,169 ****
Q_UNUSED(self);
Q_UNUSED(args);
! clConsole.ProgressDone();
return PyInt_FromLong( 1 );
}
--- 165,169 ----
Q_UNUSED(self);
Q_UNUSED(args);
! Console::instance()->ProgressDone();
return PyInt_FromLong( 1 );
}
***************
*** 176,180 ****
Q_UNUSED(self);
Q_UNUSED(args);
! clConsole.ProgressFail();
return PyInt_FromLong( 1 );
}
--- 176,180 ----
Q_UNUSED(self);
Q_UNUSED(args);
! Console::instance()->ProgressFail();
return PyInt_FromLong( 1 );
}
***************
*** 187,191 ****
Q_UNUSED(self);
Q_UNUSED(args);
! clConsole.ProgressSkip();
return PyInt_FromLong( 1 );
}
--- 187,191 ----
Q_UNUSED(self);
Q_UNUSED(args);
! Console::instance()->ProgressSkip();
return PyInt_FromLong( 1 );
}
***************
*** 198,202 ****
Q_UNUSED(self);
Q_UNUSED(args);
! QStringList linebuffer = clConsole.linebuffer();
PyObject *list = PyList_New( linebuffer.count() );
--- 198,202 ----
Q_UNUSED(self);
Q_UNUSED(args);
! QStringList linebuffer = Console::instance()->linebuffer();
PyObject *list = PyList_New( linebuffer.count() );
***************
*** 210,231 ****
}
- extern QStringList commandQueue;
- extern QMutex commandMutex;
static PyObject* wpConsole_reloadScripts( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
Q_UNUSED(args);
- // Temporary implementation while thread comunication is not done
- QMutexLocker lock(&commandMutex);
! if ( !secure )
! commandQueue.push_back( "R" );
! else
! {
! commandQueue.push_back("S");
! commandQueue.push_back("R");
! commandQueue.push_back("S");
! }
!
return PyInt_FromLong( 1 );
}
--- 210,220 ----
}
static PyObject* wpConsole_reloadScripts( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
Q_UNUSED(args);
! reloadScripts();
!
return PyInt_FromLong( 1 );
}
|