Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25472
Modified Files:
console.cpp dbdriver.cpp definitions.cpp guilds.cpp party.cpp
server.cpp speech.cpp wolfpack.pro
Log Message:
fixed possible bug with python interface ( possibly source of crashing bugs )
Added Py_RETURN_NONE/TRUE/FALSE as in Python 2.4
added status on MySQL/SQLite modules.
Index: definitions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/definitions.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** definitions.cpp 5 Jul 2004 18:23:06 -0000 1.10
--- definitions.cpp 20 Jul 2004 04:40:51 -0000 1.11
***************
*** 736,740 ****
wpDealloc,
0,
! ( getattrfunc ) wpElement_getAttr
};
--- 736,741 ----
wpDealloc,
0,
! ( getattrfunc ) wpElement_getAttr,
! 0,
};
***************
*** 748,752 ****
}
! return self->element->hasAttribute( name ) ? PyTrue() : PyFalse();
}
--- 749,755 ----
}
! if ( self->element->hasAttribute( name ) )
! Py_RETURN_TRUE;
! Py_RETURN_FALSE;
}
***************
*** 798,803 ****
else
{
! Py_INCREF( Py_None );
! return Py_None;
}
}
--- 801,805 ----
else
{
! Py_RETURN_NONE;
}
}
***************
*** 820,825 ****
else
{
! Py_INCREF( Py_None );
! return Py_None;
}
}
--- 822,826 ----
else
{
! Py_RETURN_NONE;
}
}
***************
*** 847,852 ****
else
{
! Py_INCREF( Py_None );
! return Py_None;
}
}
--- 848,852 ----
else
{
! Py_RETURN_NONE;
}
}
Index: server.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** server.cpp 2 Jun 2004 15:04:06 -0000 1.10
--- server.cpp 20 Jul 2004 04:40:51 -0000 1.11
***************
*** 420,425 ****
Console::instance()->send( "Compiled for Python " PY_VERSION " (Using: " );
! Console::instance()->send( pythonBuild + ")\n\n" );
!
QString consoleTitle = QString( "%1 %2 %3" ).arg( productString(), productBeta(), productVersion() );
Console::instance()->setConsoleTitle( consoleTitle );
--- 420,431 ----
Console::instance()->send( "Compiled for Python " PY_VERSION " (Using: " );
! Console::instance()->send( pythonBuild + ")\n" );
! Console::instance()->send( "SQLite Support: enabled\n" );
! #if defined (MYSQL_DRIVER)
! Console::instance()->send( "MySQL Support.: enabled\n" );
! #else
! Console::instance()->send( "MySQL Support.: disabled\n" );
! #endif
! Console::instance()->send("\n");
QString consoleTitle = QString( "%1 %2 %3" ).arg( productString(), productBeta(), productVersion() );
Console::instance()->setConsoleTitle( consoleTitle );
Index: party.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/party.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** party.cpp 2 Jul 2004 13:35:36 -0000 1.14
--- party.cpp 20 Jul 2004 04:40:51 -0000 1.15
***************
*** 457,461 ****
{
PyObject_HEAD_INIT( NULL )
! 0, "party", sizeof( wpPartyType ), 0, wpDealloc, 0, ( getattrfunc ) wpParty_getAttr, ( setattrfunc ) wpParty_setAttr, wpParty_compare,
};
--- 457,470 ----
{
PyObject_HEAD_INIT( NULL )
! 0,
! "party",
! sizeof( wpPartyType ),
! 0,
! wpDealloc,
! 0,
! ( getattrfunc ) wpParty_getAttr,
! ( setattrfunc ) wpParty_setAttr,
! wpParty_compare,
! 0,
};
***************
*** 490,495 ****
PyMem_Free( message );
! Py_INCREF(Py_None);
! return Py_None;
}
--- 499,503 ----
PyMem_Free( message );
! Py_RETURN_NONE;
}
***************
*** 517,521 ****
PyMem_Free( message );
! return PyTrue();
}
--- 525,529 ----
PyMem_Free( message );
! Py_RETURN_TRUE;
}
Index: speech.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/speech.cpp,v
retrieving revision 1.179
retrieving revision 1.180
diff -C2 -d -r1.179 -r1.180
*** speech.cpp 18 Jul 2004 21:02:58 -0000 1.179
--- speech.cpp 20 Jul 2004 04:40:51 -0000 1.180
***************
*** 70,74 ****
return false;
! bool ok;
//INT32 num = speech.toInt( &ok ); // Generally try to convert it
QString notification;
--- 70,74 ----
return false;
! bool ok = false;
//INT32 num = speech.toInt( &ok ); // Generally try to convert it
QString notification;
***************
*** 78,90 ****
// Pricing an item - PlayerVendors
case cPlayer::enPricing:
! if ( ok )
! {
! // pItem->setPrice( num );
! // socket->sysMessage( tr( "This item's price has been set to %1." ).arg( num ) );
! socket->sysMessage( "Ops, sorry not implemented" );
! }
! else
! socket->sysMessage( tr( "You have to enter a numeric price" ) );
!
pChar->setInputMode( cPlayer::enDescription );
socket->sysMessage( tr( "Enter a description for this item." ) );
--- 78,82 ----
// Pricing an item - PlayerVendors
case cPlayer::enPricing:
! socket->sysMessage( "Ops, sorry not implemented" );
pChar->setInputMode( cPlayer::enDescription );
socket->sysMessage( tr( "Enter a description for this item." ) );
Index: dbdriver.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbdriver.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** dbdriver.cpp 2 Jul 2004 13:35:36 -0000 1.37
--- dbdriver.cpp 20 Jul 2004 04:40:51 -0000 1.38
***************
*** 190,194 ****
{
PyObject_HEAD_INIT( NULL )
! 0, "dbresult", sizeof( wpDbResultType ), 0, wpDeallocDbResult, 0, ( getattrfunc ) wpDbResult_getAttr
};
--- 190,201 ----
{
PyObject_HEAD_INIT( NULL )
! 0,
! "dbresult",
! sizeof( wpDbResultType ),
! 0,
! wpDeallocDbResult,
! 0,
! ( getattrfunc ) wpDbResult_getAttr,
! 0,
};
***************
*** 202,207 ****
Q_UNUSED( args );
self->result->free();
! Py_INCREF( Py_None );
! return Py_None;
}
--- 209,213 ----
Q_UNUSED( args );
self->result->free();
! Py_RETURN_NONE;
}
***************
*** 217,223 ****
if ( result )
! return PyTrue();
else
! return PyFalse();
}
--- 223,229 ----
if ( result )
! Py_RETURN_TRUE;
else
! Py_RETURN_FALSE;
}
Index: guilds.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/guilds.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** guilds.cpp 5 Jul 2004 18:23:06 -0000 1.16
--- guilds.cpp 20 Jul 2004 04:40:51 -0000 1.17
***************
*** 365,369 ****
{
PyObject_HEAD_INIT( NULL )
! 0, "guild", sizeof( wpGuildType ), 0, wpDealloc, 0, ( getattrfunc ) wpGuild_getAttr, ( setattrfunc ) wpGuild_setAttr, wpGuild_compare,
};
--- 365,378 ----
{
PyObject_HEAD_INIT( NULL )
! 0,
! "guild",
! sizeof( wpGuildType ),
! 0,
! wpDealloc,
! 0,
! ( getattrfunc ) wpGuild_getAttr,
! ( setattrfunc ) wpGuild_setAttr,
! wpGuild_compare,
! 0,
};
***************
*** 391,399 ****
{
self->guild->addMember( player );
! return PyTrue();
}
else
{
! return PyFalse();
}
}
--- 400,408 ----
{
self->guild->addMember( player );
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
***************
*** 416,424 ****
{
self->guild->removeMember( player );
! return PyTrue();
}
else
{
! return PyFalse();
}
}
--- 425,433 ----
{
self->guild->removeMember( player );
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
***************
*** 441,449 ****
{
self->guild->addCanidate( player );
! return PyTrue();
}
else
{
! return PyFalse();
}
}
--- 450,458 ----
{
self->guild->addCanidate( player );
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
***************
*** 466,474 ****
{
self->guild->removeCanidate( player );
! return PyTrue();
}
else
{
! return PyFalse();
}
}
--- 475,483 ----
{
self->guild->removeCanidate( player );
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
***************
*** 540,544 ****
}
! return PyTrue();
}
--- 549,553 ----
}
! Py_RETURN_TRUE;
}
***************
*** 597,601 ****
delete self->guild;
self->guild = 0;
! return PyTrue();
}
--- 606,610 ----
delete self->guild;
self->guild = 0;
! Py_RETURN_TRUE;
}
***************
*** 653,658 ****
if ( !self->guild->leader() )
{
! Py_INCREF( Py_None );
! return Py_None;
}
else
--- 662,666 ----
if ( !self->guild->leader() )
{
! Py_RETURN_NONE;
}
else
***************
*** 757,762 ****
else
{
! Py_INCREF( Py_None );
! return Py_None;
}
}
--- 765,769 ----
else
{
! Py_RETURN_NONE;
}
}
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.197
retrieving revision 1.198
diff -C2 -d -r1.197 -r1.198
*** wolfpack.pro 19 Jul 2004 21:58:30 -0000 1.197
--- wolfpack.pro 20 Jul 2004 04:40:51 -0000 1.198
***************
*** 15,19 ****
# Common unix settings
# Lets try to figure some paths
- message("HINT: use ./configure script!")
CONFIG += console
--- 15,18 ----
***************
*** 42,51 ****
INCLUDEPATH += sqlite
win32:DEFINES -= UNICODE
- #CONFIG += precompile_header
- # Precompiled header
- precompile_header:PRECOMPILED_HEADER = wolfpack_pch.h
# Include configure's settings
! include(config.pri)
# Common files
--- 41,52 ----
INCLUDEPATH += sqlite
win32:DEFINES -= UNICODE
# Include configure's settings
! !include(config.pri) {
! message("HINT: use ./configure script!")
! }
!
! # Precompiled header
! precompile_header:PRECOMPILED_HEADER = wolfpack_pch.h
# Common files
Index: console.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** console.cpp 2 Jun 2004 15:04:04 -0000 1.20
--- console.cpp 20 Jul 2004 04:40:51 -0000 1.21
***************
*** 44,55 ****
#include <qmutex.h>
- #if defined(Q_OS_UNIX)
- #include <sys/types.h>
- #include <sys/time.h>
- #include <unistd.h>
- #else
-
- #endif
-
using namespace std;
--- 44,47 ----
|