diff pytouhou/game/laser.pyx @ 606:3c2f96f1d715

Fix compilation under Cython 0.22, by making the pyx and the pxd declarations’ except clause similar.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 26 Nov 2014 13:36:38 +0100
parents e35bef07290d
children a6af3ff86612
line wrap: on
line diff
--- a/pytouhou/game/laser.pyx
+++ b/pytouhou/game/laser.pyx
@@ -85,7 +85,7 @@ cdef class Laser(Element):
         self.set_anim()
 
 
-    cdef void set_anim(self, long sprite_idx_offset=-1):
+    cdef void set_anim(self, long sprite_idx_offset=-1) except *:
         if sprite_idx_offset >= 0:
             self.sprite_idx_offset = sprite_idx_offset
 
@@ -221,7 +221,7 @@ cdef class PlayerLaser(Element):
         self.set_anim()
 
 
-    cdef void set_anim(self, long sprite_idx_offset=-1):
+    cdef void set_anim(self, long sprite_idx_offset=-1) except *:
         if sprite_idx_offset >= 0:
             self.sprite_idx_offset = sprite_idx_offset
 
@@ -232,11 +232,11 @@ cdef class PlayerLaser(Element):
         #self.sprite.blendfunc = 1 #XXX
 
 
-    cdef void cancel(self):
+    cdef void cancel(self) except *:
         self.anmrunner.interrupt(1)
 
 
-    cdef void update(self):
+    cdef void update(self) except *:
         if self.anmrunner is not None and not self.anmrunner.run_frame():
             self.anmrunner = None
             self.removed = True