[wpdev-commits] wolfpack/python pyaccount.cpp,1.15,1.16
Brought to you by:
rip,
thiagocorrea
|
From: <thi...@us...> - 2003-08-09 03:18:55
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv19196/python
Modified Files:
pyaccount.cpp
Log Message:
Fixed 2 crashing bugs.
The first related to orphaned cPlayers and the second about PyString_FromString() not handling 0 properly ( Python's C API bug? )
Index: pyaccount.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/pyaccount.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** pyaccount.cpp 6 Aug 2003 01:24:55 -0000 1.15
--- pyaccount.cpp 9 Aug 2003 03:18:52 -0000 1.16
***************
*** 55,59 ****
*/
static PyTypeObject wpAccountType = {
! PyObject_HEAD_INIT(NULL)
0,
"wpaccount",
--- 55,59 ----
*/
static PyTypeObject wpAccountType = {
! PyObject_HEAD_INIT(&wpAccountType)
0,
"wpaccount",
***************
*** 203,207 ****
}
else if( !strcmp( name, "lastlogin" ) )
! return PyString_FromString( self->account->lastLogin().toString().latin1() );
else if( !strcmp( name, "blockuntil" ) )
{
--- 203,212 ----
}
else if( !strcmp( name, "lastlogin" ) )
! {
! if ( !self->account->lastLogin().isValid() )
! return PyString_FromString("Unknown");
! else
! return PyString_FromString( self->account->lastLogin().toString().latin1() );
! }
else if( !strcmp( name, "blockuntil" ) )
{
|