Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv30835/python
Modified Files:
utilities.h
Log Message:
Fixed several missing Py_DECREF in the python script code.
also fixed issue with every item decaying.
Index: utilities.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/utilities.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** utilities.h 26 Jul 2003 01:10:55 -0000 1.19
--- utilities.h 26 Aug 2003 03:55:13 -0000 1.20
***************
*** 56,63 ****
#define PyFalse PyInt_FromLong( 0 )
#define PyTrue PyInt_FromLong( 1 )
! #define PyHasMethod(a) if( codeModule == NULL ) return false; if( !PyObject_HasAttr( codeModule, PyString_FromString( a ) ) ) return false;
!
! // Method Calling Macro!
! #define PyEvalMethod(a) PyObject* method = PyObject_GetAttr( codeModule, PyString_FromString( a ) ); if( ( method == NULL ) || ( !PyCallable_Check( method ) ) ) return false; PyObject *returnValue = PyObject_CallObject( method, tuple ); PyReportError(); if( returnValue == NULL ) return false; if( !PyInt_Check( returnValue ) ) return false; if( PyInt_AsLong( returnValue ) == 1 ) return true; else return false;
// Setting and getting item/char properties
--- 56,60 ----
#define PyFalse PyInt_FromLong( 0 )
#define PyTrue PyInt_FromLong( 1 )
! #define PyHasMethod(a) if( codeModule == NULL ) return false; if( !PyObject_HasAttrString( codeModule, a ) ) return false;
// Setting and getting item/char properties
|