diff pytouhou/ui/opengl/gamerenderer.pyx @ 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 1b31169dc344
children
line wrap: on
line diff
--- a/pytouhou/ui/opengl/gamerenderer.pyx
+++ b/pytouhou/ui/opengl/gamerenderer.pyx
@@ -121,7 +121,7 @@ cdef class GameRenderer(Renderer):
         free(capture_memory)
 
 
-    cdef void render_game(self, Game game) except *:
+    cdef bint render_game(self, Game game) except True:
         cdef long game_x, game_y
         cdef float x, y, z, dx, dy, dz
         cdef float fog_data[4]
@@ -235,11 +235,11 @@ cdef class GameRenderer(Renderer):
             glPopDebugGroup()
 
 
-    cdef void render_text(self, dict texts) except *:
+    cdef bint render_text(self, dict texts) except True:
         cdef NativeText label
 
         if self.font_manager is None:
-            return
+            return False
 
         self.font_manager.load(texts)
 
@@ -258,7 +258,7 @@ cdef class GameRenderer(Renderer):
                 self.render_quads([rect], [gradient], texture)
 
 
-    cdef void render_interface(self, interface, game_boss) except *:
+    cdef bint render_interface(self, interface, game_boss) except True:
         cdef GlyphCollection label
 
         elements = []