Author: ArcRiley
Date: 2008-05-18 15:16:09 -0400 (Sun, 18 May 2008)
New Revision: 1271

Modified:
   trunk/pysoy/include/math.pxd
   trunk/pysoy/src/_datatypes/HashTable.pym
   trunk/pysoy/src/scenes/Scene.pym
Log:
'''Pyrex 0.9.8.2 fixes''' :
  * fixed HashTable._lookup - returns 0.0 if key is not found (can't raise)
  * removed two unused cdefs from Scene


Modified: trunk/pysoy/include/math.pxd
===================================================================
--- trunk/pysoy/include/math.pxd        2008-05-18 19:02:49 UTC (rev 1270)
+++ trunk/pysoy/include/math.pxd        2008-05-18 19:16:09 UTC (rev 1271)
@@ -17,7 +17,7 @@
 #
 # $Id$
 
-cdef extern from "math.h" :
+cdef extern from "math.h" nogil :
   long int lround  (double x)
   long int lroundf (float x)
   float fabsf (float number)

Modified: trunk/pysoy/src/_datatypes/HashTable.pym
===================================================================
--- trunk/pysoy/src/_datatypes/HashTable.pym    2008-05-18 19:02:49 UTC (rev 
1270)
+++ trunk/pysoy/src/_datatypes/HashTable.pym    2008-05-18 19:16:09 UTC (rev 
1271)
@@ -71,12 +71,12 @@
     glib.g_hash_table_insert(self._hashtable, k, d)
 
 
-  cdef float _lookup(self, char* key) nogil :
-    cdef float* f
-    f = <float*> glib.g_hash_table_lookup(self._hashtable, key)
-    if f == NULL :
-      raise RuntimeError('No such key')
-    return f[0]
+  cdef float _lookup(self, char* _key) nogil :
+    cdef float* _f
+    _f = <float*> glib.g_hash_table_lookup(self._hashtable, _key)
+    if _f == NULL :
+      return 0.0
+    return _f[0]
 
 
   cdef int _has_key(self, char* key) nogil :

Modified: trunk/pysoy/src/scenes/Scene.pym
===================================================================
--- trunk/pysoy/src/scenes/Scene.pym    2008-05-18 19:02:49 UTC (rev 1270)
+++ trunk/pysoy/src/scenes/Scene.pym    2008-05-18 19:16:09 UTC (rev 1271)
@@ -184,8 +184,7 @@
     cdef ode.dContactGeom   _contactGeom[2]
     cdef ode.dGeomID        _geomIDs[2]
     cdef ode.dBodyID        _bodyIDs[2]
-    cdef soy.bodies.Body    _bodyA
-    cdef soy.bodies.Body    _bodyB
+
     #
     # Start by generating up to four contacts between 2 bodies
     _contactGeoms = ode.dCollide(_geomA, _geomB, 2,

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to