Mercurial > touhou
diff pytouhou/game/laser.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 | 53fa73932e9a |
children |
line wrap: on
line diff
--- a/pytouhou/game/laser.pxd +++ b/pytouhou/game/laser.pxd @@ -23,7 +23,7 @@ cdef class Laser(Element): cdef State state cdef LaserType _laser_type - cdef void set_anim(self, long sprite_idx_offset=*) except * + cdef bint set_anim(self, long sprite_idx_offset=*) except True cpdef set_base_pos(self, double x, double y) cdef bint _check_collision(self, double point[2], double border_size) cdef bint check_collision(self, double point[2]) @@ -40,6 +40,6 @@ cdef class PlayerLaser(Element): cdef Element origin cdef LaserType _laser_type - cdef void set_anim(self, long sprite_idx_offset=*) except * - cdef void cancel(self) except * - cdef void update(self) except * + cdef bint set_anim(self, long sprite_idx_offset=*) except True + cdef bint cancel(self) except True + cdef bint update(self) except True