diff pytouhou/game/text.pxd @ 617:a6af3ff86612

Change all “void except *” function into “bint except True”, to prevent PyErr_Occurred() from being called at each call.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 29 Mar 2015 00:08:20 +0100
parents e15672733c93
children
line wrap: on
line diff
--- a/pytouhou/game/text.pxd
+++ b/pytouhou/game/text.pxd
@@ -39,7 +39,7 @@ cdef class Text(GlyphCollection):
     #def timeout_update(self)
     #def move_timeout_update(self)
     #def fadeout_timeout_update(self)
-    cdef void fade(self, unsigned long duration, unsigned char alpha, formula=*) except *
+    cdef bint fade(self, unsigned long duration, unsigned char alpha, formula=*) except True
     cpdef set_timeout(self, unsigned long timeout, str effect=*, unsigned long duration=*, unsigned long start=*)
 
 
@@ -79,6 +79,6 @@ cdef class NativeText(Element):
     #def move_ex_timeout_update(self)
     #def fadeout_timeout_update(self)
 
-    cdef void fade(self, unsigned long duration, unsigned char alpha, formula=*) except *
-    cdef void move_in(self, unsigned long duration, double x, double y, formula=*) except *
+    cdef bint fade(self, unsigned long duration, unsigned char alpha, formula=*) except True
+    cdef bint move_in(self, unsigned long duration, double x, double y, formula=*) except True
     cpdef set_timeout(self, unsigned long timeout, str effect=*, unsigned long duration=*, unsigned long start=*, to=*, end=*)