Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6599/python
Modified Files:
global.cpp pyaccount.cpp regioniterator.h
Log Message:
Experimental MacOS X support
Index: regioniterator.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/regioniterator.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** regioniterator.h 10 Aug 2004 03:27:54 -0000 1.13
--- regioniterator.h 24 Aug 2004 00:23:24 -0000 1.14
***************
*** 88,92 ****
0,
0,
!
};
--- 88,92 ----
0,
0,
! 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};
***************
*** 164,168 ****
0,
0,
!
};
--- 164,168 ----
0,
0,
! 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.146
retrieving revision 1.147
diff -C2 -d -r1.146 -r1.147
*** global.cpp 19 Aug 2004 01:22:57 -0000 1.146
--- global.cpp 24 Aug 2004 00:23:23 -0000 1.147
***************
*** 359,363 ****
\description Creates a new item from a given definition id and assigns a new serial to it.
*/
! static PyObject* wpAdditem( PyObject* self, PyObject* args )
{
char* definition;
--- 359,363 ----
\description Creates a new item from a given definition id and assigns a new serial to it.
*/
! static PyObject* wpAdditem( PyObject* /*self*/, PyObject* args )
{
char* definition;
***************
*** 380,384 ****
\description Creates a new npc from the given definition and moves it to the given position.
*/
! static PyObject* wpAddnpc( PyObject* self, PyObject* args )
{
char* definition;
--- 380,384 ----
\description Creates a new npc from the given definition and moves it to the given position.
*/
! static PyObject* wpAddnpc( PyObject* /*self*/, PyObject* args )
{
char* definition;
***************
*** 418,424 ****
\description Returns a list of all registered guilds in the world.
*/
! static PyObject* wpGuilds( PyObject* self, PyObject* args )
{
- Q_UNUSED( args );
PyObject* list = PyList_New( 0 );
--- 418,423 ----
\description Returns a list of all registered guilds in the world.
*/
! static PyObject* wpGuilds( PyObject* /*self*/, PyObject* /*args*/ )
{
PyObject* list = PyList_New( 0 );
***************
*** 480,484 ****
\description Tries to find a multi at the given position. Returns None if none can be found.
*/
! static PyObject* wpFindmulti( PyObject* self, PyObject* args )
{
Coord_cl coord;
--- 479,483 ----
\description Tries to find a multi at the given position. Returns None if none can be found.
*/
! static PyObject* wpFindmulti( PyObject* /*self*/, PyObject* args )
{
Coord_cl coord;
***************
*** 994,998 ****
hook per event at a time, but a script can hook more than one event to itself.
*/
! static PyObject* wpRegisterGlobal( PyObject* self, PyObject* args )
{
unsigned int event;
--- 993,997 ----
hook per event at a time, but a script can hook more than one event to itself.
*/
! static PyObject* wpRegisterGlobal( PyObject* /*self*/, PyObject* args )
{
unsigned int event;
***************
*** 1037,1041 ****
you can implement custom ingame commands.
*/
! static PyObject* wpRegisterCommand( PyObject* self, PyObject* args )
{
const char* command;
--- 1036,1040 ----
you can implement custom ingame commands.
*/
! static PyObject* wpRegisterCommand( PyObject* /*self*/, PyObject* args )
{
const char* command;
***************
*** 1072,1076 ****
True in your function, otherwise return False.
*/
! static PyObject* wpRegisterPacketHook( PyObject* self, PyObject* args )
{
unsigned char packet;
--- 1071,1075 ----
True in your function, otherwise return False.
*/
! static PyObject* wpRegisterPacketHook( PyObject* /*self*/, PyObject* args )
{
unsigned char packet;
***************
*** 1125,1129 ****
Please note that multis are represented by the item object.
*/
! static PyObject* wpAddMulti( PyObject* self, PyObject* args )
{
char* definition;
--- 1124,1128 ----
Please note that multis are represented by the item object.
*/
! static PyObject* wpAddMulti( PyObject* /*self*/, PyObject* args )
{
char* definition;
***************
*** 1271,1275 ****
Please use this function wisely. It is better to use the additem function whenever possible instead.
*/
! static PyObject* wpNewItem( PyObject* self, PyObject* args )
{
char createSerial = 1;
--- 1270,1274 ----
Please use this function wisely. It is better to use the additem function whenever possible instead.
*/
! static PyObject* wpNewItem( PyObject* /*self*/, PyObject* args )
{
char createSerial = 1;
***************
*** 1295,1299 ****
Please use this function wisely. It is better to use the addnpc function whenever possible instead.
*/
! static PyObject* wpNewNpc( PyObject* self, PyObject* args )
{
char createSerial = 1;
--- 1294,1298 ----
Please use this function wisely. It is better to use the addnpc function whenever possible instead.
*/
! static PyObject* wpNewNpc( PyObject* /*self*/, PyObject* args )
{
char createSerial = 1;
***************
*** 1315,1321 ****
\description This function will create a new guild.
*/
! static PyObject* wpNewguild( PyObject* self, PyObject* args )
{
- Q_UNUSED( args );
cGuild* guild = new cGuild( true );
Guilds::instance()->registerGuild( guild );
--- 1314,1319 ----
\description This function will create a new guild.
*/
! static PyObject* wpNewguild( PyObject* /*self*/, PyObject* /*args*/ )
{
cGuild* guild = new cGuild( true );
Guilds::instance()->registerGuild( guild );
***************
*** 1333,1337 ****
characters.
*/
! static PyObject* wpNewPlayer( PyObject* self, PyObject* args )
{
char createSerial = 1;
--- 1331,1335 ----
characters.
*/
! static PyObject* wpNewPlayer( PyObject* /*self*/, PyObject* args )
{
char createSerial = 1;
***************
*** 1458,1462 ****
an element object to access its data.
*/
! static PyObject* wpGetDefinition( PyObject* self, PyObject* args )
{
unsigned int type;
--- 1456,1460 ----
an element object to access its data.
*/
! static PyObject* wpGetDefinition( PyObject* /*self*/, PyObject* args )
{
unsigned int type;
***************
*** 1489,1497 ****
\description This function will compile the ids of all sections of a given type.
*/
! static PyObject* wpGetDefinitions( PyObject* self, PyObject* args )
{
unsigned int type;
! if ( !PyArg_ParseTuple( args, "I:getdefinitions(type)", &type ) )
{
return 0;
--- 1487,1495 ----
\description This function will compile the ids of all sections of a given type.
*/
! static PyObject* wpGetDefinitions( PyObject* /*self*/, PyObject* args )
{
unsigned int type;
! if ( !PyArg_ParseTuple( args, "I:wolfpack.getdefinitions(type)", &type ) )
{
return 0;
***************
*** 1527,1531 ****
\description This function calls an event handler in the given script.
*/
! static PyObject* wpCallEvent( PyObject* self, PyObject* args )
{
char* script;
--- 1525,1529 ----
\description This function calls an event handler in the given script.
*/
! static PyObject* wpCallEvent( PyObject* /*self*/, PyObject* args )
{
char* script;
***************
*** 1564,1568 ****
\description This function checks if the given script can handle an event of the given type and returns true if it can.
*/
! static PyObject* wpHasEvent( PyObject* self, PyObject* args )
{
char* script;
--- 1562,1566 ----
\description This function checks if the given script can handle an event of the given type and returns true if it can.
*/
! static PyObject* wpHasEvent( PyObject* /*self*/, PyObject* args )
{
char* script;
***************
*** 1604,1608 ****
\description This function calls an event handler in the given script.
*/
! static PyObject* wpCallNamedEvent( PyObject* self, PyObject* args )
{
char* script;
--- 1602,1606 ----
\description This function calls an event handler in the given script.
*/
! static PyObject* wpCallNamedEvent( PyObject* /*self*/, PyObject* args )
{
char* script;
***************
*** 1640,1644 ****
\description This function checks if the given script can handle an event with the given name and returns true if it can.
*/
! static PyObject* wpHasNamedEvent( PyObject* self, PyObject* args )
{
char* script;
--- 1638,1642 ----
\description This function checks if the given script can handle an event with the given name and returns true if it can.
*/
! static PyObject* wpHasNamedEvent( PyObject* /*self*/, PyObject* args )
{
char* script;
***************
*** 1679,1685 ****
\description This function retrieves an option from the world database.
*/
! static PyObject* wpGetOption( PyObject* self, PyObject* args )
{
- Q_UNUSED( self );
QString arg_key = getArgStr( 0 );
QString arg_def = getArgStr( 1 );
--- 1677,1682 ----
\description This function retrieves an option from the world database.
*/
! static PyObject* wpGetOption( PyObject* /*self*/, PyObject* args )
{
QString arg_key = getArgStr( 0 );
QString arg_def = getArgStr( 1 );
***************
*** 1695,1702 ****
\description This function sets a given option in the world database.
*/
! static PyObject* wpSetOption( PyObject* self, PyObject* args )
{
- Q_UNUSED( self );
-
QString arg_key = getArgStr( 0 );
QString arg_val = getArgStr( 1 );
--- 1692,1697 ----
\description This function sets a given option in the world database.
*/
! static PyObject* wpSetOption( PyObject* /*self*/, PyObject* args )
{
QString arg_key = getArgStr( 0 );
QString arg_val = getArgStr( 1 );
***************
*** 1726,1730 ****
\description Retrieve information about a given character baseid.
*/
! static PyObject* wpCharBase( PyObject* self, PyObject* args )
{
char *baseid;
--- 1721,1725 ----
\description Retrieve information about a given character baseid.
*/
! static PyObject* wpCharBase( PyObject* /*self*/, PyObject* args )
{
char *baseid;
***************
*** 1822,1829 ****
and returns it.
*/
! static PyObject* wpSocketsFirst( PyObject* self, PyObject* args )
{
- Q_UNUSED( self );
- Q_UNUSED( args );
return PyGetSocketObject( Network::instance()->first() );
}
--- 1817,1822 ----
and returns it.
*/
! static PyObject* wpSocketsFirst( PyObject* /*self*/, PyObject* /*args*/ )
{
return PyGetSocketObject( Network::instance()->first() );
}
***************
*** 1835,1842 ****
and returns it. If there is no socket available, None is returned.
*/
! static PyObject* wpSocketsNext( PyObject* self, PyObject* args )
{
- Q_UNUSED( self );
- Q_UNUSED( args );
return PyGetSocketObject( Network::instance()->next() );
}
--- 1828,1833 ----
and returns it. If there is no socket available, None is returned.
*/
! static PyObject* wpSocketsNext( PyObject* /*self*/, PyObject* /*args*/ )
{
return PyGetSocketObject( Network::instance()->next() );
}
***************
*** 1872,1876 ****
\description This function returns the number of accounts on the server.
*/
! static PyObject* wpAccountsCount( PyObject* self, PyObject* args )
{
return PyInt_FromLong( Accounts::instance()->count() );
--- 1863,1867 ----
\description This function returns the number of accounts on the server.
*/
! static PyObject* wpAccountsCount( PyObject* /*self*/, PyObject* /*args*/ )
{
return PyInt_FromLong( Accounts::instance()->count() );
***************
*** 2237,2241 ****
\description This function executes the given SQL query in the currently connected database and returns the result.
*/
! static PyObject* wpQuery( PyObject* self, PyObject* args )
{
char* query;
--- 2228,2232 ----
\description This function executes the given SQL query in the currently connected database and returns the result.
*/
! static PyObject* wpQuery( PyObject* /*self*/, PyObject* args )
{
char* query;
***************
*** 2275,2279 ****
\description This function executes the given SQL query in the currently connected database and discards the result if there is any.
*/
! static PyObject* wpExecute( PyObject* self, PyObject* args )
{
char* query;
--- 2266,2270 ----
\description This function executes the given SQL query in the currently connected database and discards the result if there is any.
*/
! static PyObject* wpExecute( PyObject* /*self*/, PyObject* args )
{
char* query;
***************
*** 2288,2292 ****
PersistentBroker::instance()->executeQuery( query );
}
! catch ( QString e )
{
PyMem_Free( query );
--- 2279,2283 ----
PersistentBroker::instance()->executeQuery( query );
}
! catch ( QString& e )
{
PyMem_Free( query );
***************
*** 2336,2342 ****
\description This function closes the connection to the given database.
*/
! static PyObject* wpClose( PyObject* self, PyObject* args )
{
- Q_UNUSED( args );
try
{
--- 2327,2332 ----
\description This function closes the connection to the given database.
*/
! static PyObject* wpClose( PyObject* /*self*/, PyObject* /*args*/ )
{
try
{
***************
*** 2357,2361 ****
\description This function opens the connection to the given database.
*/
! static PyObject* wpOpen( PyObject* self, PyObject* args )
{
unsigned int database;
--- 2347,2351 ----
\description This function opens the connection to the given database.
*/
! static PyObject* wpOpen( PyObject* /*self*/, PyObject* args )
{
unsigned int database;
***************
*** 2377,2381 ****
}
}
! catch ( QString e )
{
PyErr_SetString( PyExc_RuntimeError, e.latin1() );
--- 2367,2371 ----
}
}
! catch ( QString& e )
{
PyErr_SetString( PyExc_RuntimeError, e.latin1() );
Index: pyaccount.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/pyaccount.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** pyaccount.cpp 22 Aug 2004 15:12:48 -0000 1.39
--- pyaccount.cpp 24 Aug 2004 00:23:24 -0000 1.40
***************
*** 80,84 ****
0, // Call
( reprfunc ) wpAccount_str,
! 0,
};
--- 80,84 ----
0, // Call
( reprfunc ) wpAccount_str,
! 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};
|