Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19784/python
Modified Files:
char.cpp global.cpp gump.h item.cpp socket.cpp target.cpp
tempeffect.h
Log Message:
Fixes
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.159
retrieving revision 1.160
diff -C2 -d -r1.159 -r1.160
*** global.cpp 19 Sep 2004 16:50:41 -0000 1.159
--- global.cpp 19 Sep 2004 22:13:36 -0000 1.160
***************
*** 1602,1612 ****
if ( result )
{
! Py_INCREF( Py_True );
! return Py_True;
}
else
{
! Py_INCREF( Py_False );
! return Py_False;
}
}
--- 1602,1610 ----
if ( result )
{
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
***************
*** 1678,1688 ****
if ( result )
{
! Py_INCREF( Py_True );
! return Py_True;
}
else
{
! Py_INCREF( Py_False );
! return Py_False;
}
}
--- 1676,1684 ----
if ( result )
{
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.195
retrieving revision 1.196
diff -C2 -d -r1.195 -r1.196
*** char.cpp 19 Sep 2004 16:23:43 -0000 1.195
--- char.cpp 19 Sep 2004 22:13:35 -0000 1.196
***************
*** 2392,2402 ****
if ( self->pChar->hasScript( script ) )
{
! Py_INCREF( Py_True );
! return Py_True;
}
else
{
! Py_INCREF( Py_False );
! return Py_False;
}
}
--- 2392,2400 ----
if ( self->pChar->hasScript( script ) )
{
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
Index: item.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -C2 -d -r1.132 -r1.133
*** item.cpp 10 Sep 2004 04:10:37 -0000 1.132
--- item.cpp 19 Sep 2004 22:13:36 -0000 1.133
***************
*** 959,969 ****
if ( self->pItem->hasScript( script ) )
{
! Py_INCREF( Py_True );
! return Py_True;
}
else
{
! Py_INCREF( Py_False );
! return Py_False;
}
}
--- 959,967 ----
if ( self->pItem->hasScript( script ) )
{
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
Index: target.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/target.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** target.cpp 16 Sep 2004 01:40:19 -0000 1.1
--- target.cpp 19 Sep 2004 22:13:37 -0000 1.2
***************
*** 131,134 ****
--- 131,135 ----
PyObject* p_args = PyTuple_New( 3 );
PyTuple_SetItem( p_args, 0, PyGetCharObject( socket->player() ) );
+ Py_INCREF(args);
PyTuple_SetItem( p_args, 1, args );
PyTuple_SetItem( p_args, 2, PyGetTarget( target, socket->player()->pos().map ) );
Index: tempeffect.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/tempeffect.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** tempeffect.h 29 Aug 2004 14:05:17 -0000 1.30
--- tempeffect.h 19 Sep 2004 22:13:37 -0000 1.31
***************
*** 121,126 ****
--- 121,128 ----
}
+ Py_INCREF(args); // PyTuple_SetItem steals a reference
PyTuple_SetItem( p_args, 1, args );
PyTuple_SetItem( p_args, 2, PyGetCharObject( pSource ) );
+ Py_INCREF(disp_args);
PyTuple_SetItem( p_args, 3, disp_args );
***************
*** 163,169 ****
else if ( isCharSerial( destSer ) )
PyTuple_SetItem( p_args, 0, PyGetCharObject( FindCharBySerial( destSer ) ) );
! else
! PyTuple_SetItem( p_args, 0, PyFalse() );
PyTuple_SetItem( p_args, 1, args );
--- 165,174 ----
else if ( isCharSerial( destSer ) )
PyTuple_SetItem( p_args, 0, PyGetCharObject( FindCharBySerial( destSer ) ) );
! else {
! Py_INCREF(Py_None);
! PyTuple_SetItem( p_args, 0, Py_None );
! }
+ Py_INCREF(args);
PyTuple_SetItem( p_args, 1, args );
Index: socket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/socket.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** socket.cpp 14 Sep 2004 03:56:44 -0000 1.85
--- socket.cpp 19 Sep 2004 22:13:36 -0000 1.86
***************
*** 663,673 ****
if ( self->pSock->useItem( item ) )
{
! Py_INCREF( Py_True );
! return Py_True;
}
else
{
! Py_INCREF( Py_False );
! return Py_False;
}
}
--- 663,671 ----
if ( self->pSock->useItem( item ) )
{
! Py_RETURN_TRUE;
}
else
{
! Py_RETURN_FALSE;
}
}
Index: gump.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/gump.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** gump.h 5 Sep 2004 14:08:21 -0000 1.26
--- gump.h 19 Sep 2004 22:13:36 -0000 1.27
***************
*** 157,160 ****
--- 157,161 ----
PyObject* p_args = PyTuple_New( 3 );
PyTuple_SetItem( p_args, 0, PyGetCharObject( socket->player() ) );
+ Py_INCREF(args);
PyTuple_SetItem( p_args, 1, args );
PyTuple_SetItem( p_args, 2, PyGetGumpResponse( choice ) );
|