ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/plugins/cfpython/cfpython_object.c
(Generate patch)

Comparing deliantra/server/plugins/cfpython/cfpython_object.c (file contents):
Revision 1.1.1.1 by root, Fri Feb 3 07:14:19 2006 UTC vs.
Revision 1.1.1.2 by elmex, Wed Feb 22 18:03:15 2006 UTC

1418 return NULL; 1418 return NULL;
1419 if ( ( resist < 0 ) || ( resist >= NROFATTACKS ) ) 1419 if ( ( resist < 0 ) || ( resist >= NROFATTACKS ) )
1420 { 1420 {
1421 return Py_BuildValue("l",0); 1421 return Py_BuildValue("l",0);
1422 } 1422 }
1423 return Py_BuildValue("i",*( sint16* )cf_object_get_resistance( who->obj, resist)); 1423 return Py_BuildValue("i",cf_object_get_resistance( who->obj, resist));
1424} 1424}
1425static PyObject* Crossfire_Object_QueryCost( Crossfire_Object* who, PyObject* args ) 1425static PyObject* Crossfire_Object_QueryCost( Crossfire_Object* who, PyObject* args )
1426{ 1426{
1427 int flags; 1427 int flags;
1428 Crossfire_Object* pcause; 1428 Crossfire_Object* pcause;
1635 return Crossfire_Object_wrap(myob); 1635 return Crossfire_Object_wrap(myob);
1636} 1636}
1637 1637
1638static int Crossfire_Object_InternalCompare(Crossfire_Object* left, Crossfire_Object* right) 1638static int Crossfire_Object_InternalCompare(Crossfire_Object* left, Crossfire_Object* right)
1639{ 1639{
1640 return ((int)left->obj - (int)right->obj); 1640 return (left->obj < right->obj ? -1 : ( left->obj == right->obj ? 0 : 1 ) );
1641} 1641}
1642 1642
1643/* Legacy code: convert to long so that non-object functions work correctly */ 1643/* Legacy code: convert to long so that non-object functions work correctly */
1644static PyObject* Crossfire_Object_Long( PyObject* obj ) 1644static PyObject* Crossfire_Object_Long( PyObject* obj )
1645{ 1645{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines