diff pytouhou/ui/sdl/sprite.pyx @ 616:4ce3ef053a25

Remove every case where an exception could be silently eaten by a cdef function.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 28 Mar 2015 23:21:15 +0100
parents dacdcca59b66
children
line wrap: on
line diff
--- a/pytouhou/ui/sdl/sprite.pyx
+++ b/pytouhou/ui/sdl/sprite.pyx
@@ -12,7 +12,7 @@
 ## GNU General Public License for more details.
 ##
 
-
+cimport cython
 from libc.stdlib cimport malloc
 from libc.math cimport M_PI as pi
 
@@ -23,6 +23,7 @@ cdef RenderingData* get_sprite_rendering
     return <RenderingData*>sprite._rendering_data
 
 
+@cython.cdivision(True)
 cdef void render_sprite(Sprite sprite) nogil:
     if sprite._rendering_data == NULL:
         sprite._rendering_data = malloc(sizeof(RenderingData))