[wpdev-commits] wolfpack/python global.cpp,1.151,1.152 python.pri,1.2,1.3
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-08-31 19:17:18
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26217/python Modified Files: global.cpp python.pri Log Message: account syncro Index: python.pri =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/python.pri,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** python.pri 23 Aug 2004 22:25:26 -0000 1.2 --- python.pri 31 Aug 2004 19:16:49 -0000 1.3 *************** *** 6,9 **** --- 6,10 ---- $$PYTHON_H/gump.h \ $$PYTHON_H/objectcache.h \ + $$PYTHON_H/pyaction.h \ $$PYTHON_H/pypacket.h \ $$PYTHON_H/pyspawnregion.h \ *************** *** 19,23 **** $$PYTHON_CPP/item.cpp \ $$PYTHON_CPP/pyaccount.cpp \ ! $$PYTHON_CPP/pyai.cpp \ $$PYTHON_CPP/pycoord.cpp \ $$PYTHON_CPP/pypacket.cpp \ --- 20,25 ---- $$PYTHON_CPP/item.cpp \ $$PYTHON_CPP/pyaccount.cpp \ ! $$PYTHON_CPP/pyaction.cpp \ ! $$PYTHON_CPP/pyai.cpp \ $$PYTHON_CPP/pycoord.cpp \ $$PYTHON_CPP/pypacket.cpp \ Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -d -r1.151 -r1.152 *** global.cpp 31 Aug 2004 13:06:45 -0000 1.151 --- global.cpp 31 Aug 2004 19:16:49 -0000 1.152 *************** *** 56,59 **** --- 56,60 ---- #include "../basedef.h" + #include "pyaction.h" #include "pypacket.h" #include "regioniterator.h" *************** *** 1444,1448 **** Server::instance()->queueAction( ( enActionType ) type ); ! return PyInt_FromLong( 1 ); } --- 1445,1472 ---- Server::instance()->queueAction( ( enActionType ) type ); ! Py_RETURN_NONE; ! } ! ! /* ! \function wolfpack.queuecode ! \param function A python code object. ! \param arguments A tuple. ! \description This function queues a python code object to be executed in the main thread. ! This funciton is useful if you want to access wolfpack internals from within another ! python thread. Use this function to queue code that should be executed synchronized with the ! main thread. ! */ ! static PyObject* wpQueueCode( PyObject* self, PyObject* args ) ! { ! Q_UNUSED( self ); ! ! PyObject *code, *pargs; ! ! if ( !PyArg_ParseTuple( args, "OO!:wolfpack.queuecode( code, args )", &code, &PyTuple_Type, &pargs ) ) ! return 0; ! ! Server::instance()->queueAction( new cActionPythonCode( code, pargs ) ); ! ! Py_RETURN_NONE; } *************** *** 1805,1808 **** --- 1829,1833 ---- { "tickcount", wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" }, { "queueaction", wpQueueAction, METH_VARARGS, NULL }, + { "queuecode", wpQueueCode, METH_VARARGS, NULL }, { "charcount", wpCharCount, METH_NOARGS, "Returns the number of chars in the world" }, { "itemcount", wpItemCount, METH_NOARGS, "Returns the number of items in the world" }, |