[wpdev-commits] wolfpack/python char.cpp,1.107,1.108 tempeffect.h,1.9,1.10
Brought to you by:
rip,
thiagocorrea
|
From: <dar...@us...> - 2003-09-25 03:06:31
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv1069/python
Modified Files:
char.cpp tempeffect.h
Log Message:
Several changes and fixes.
Fixed Python TempEffect Error Reporting and added correct line breaks to the windows console.
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -C2 -d -r1.107 -r1.108
*** char.cpp 23 Sep 2003 23:55:25 -0000 1.107
--- char.cpp 25 Sep 2003 03:05:59 -0000 1.108
***************
*** 161,178 ****
{
// Affix?
! QString clilocargs = QString::null;
! QString affix = QString::null;
!
! if( checkArgStr( 1 ) )
! clilocargs = getArgStr( 1 );
! if( checkArgStr( 2 ) )
! affix = getArgStr( 2 );
// Cliloc Message
! if( !affix.isNull() )
! player->socket()->clilocMessageAffix( getArgInt( 0 ), clilocargs, affix, 0x3b2, 3, player, false, false );
else
! player->socket()->clilocMessage( getArgInt( 0 ), clilocargs, 0x3b2, 3, player );
}
else
--- 161,176 ----
{
// Affix?
! unsigned int id;
! char *clilocargs = 0;
! char *affix = 0;
! if( !PyArg_ParseTuple( args, "i|ss:char.message( clilocid, [args], [affix] )", &id, &clilocargs, &affix ) )
! return 0;
// Cliloc Message
! if( affix )
! player->socket()->clilocMessageAffix( id, clilocargs, affix, 0x3b2, 3, player, false, false );
else
! player->socket()->clilocMessage( id, clilocargs, 0x3b2, 3, player );
}
else
Index: tempeffect.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/tempeffect.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tempeffect.h 12 Sep 2003 15:29:00 -0000 1.9
--- tempeffect.h 25 Sep 2003 03:05:59 -0000 1.10
***************
*** 106,115 ****
PyTuple_SetItem( p_args, 3, disp_args );
! PyEval_CallObject( pFunc, p_args );
!
! if( PyErr_Occurred() )
! PyErr_Print();
}
}
}
--- 106,119 ----
PyTuple_SetItem( p_args, 3, disp_args );
! PyObject *result = PyEval_CallObject( pFunc, p_args );
! Py_XDECREF( result );
!
! reportPythonError( sModule );
! Py_DECREF( p_args );
}
+
+ Py_XDECREF( pFunc );
}
+ Py_XDECREF( pModule );
}
***************
*** 145,154 ****
PyTuple_SetItem( p_args, 1, args );
! PyEval_CallObject( pFunc, p_args );
!
! if( PyErr_Occurred() )
! PyErr_Print();
}
}
}
--- 149,161 ----
PyTuple_SetItem( p_args, 1, args );
! PyObject *result = PyEval_CallObject( pFunc, p_args );
! Py_XDECREF( result );
! reportPythonError( sModule );
!
! Py_DECREF( p_args );
}
+ Py_DECREF( pFunc );
}
+ Py_XDECREF( pModule );
}
|