Mercurial > touhou
comparison pytouhou/ui/window.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 | 3c2f96f1d715 |
children | 80687f258001 |
comparison
equal
deleted
inserted
replaced
616:4ce3ef053a25 | 617:a6af3ff86612 |
---|---|
31 self._ref_tick = 0 | 31 self._ref_tick = 0 |
32 self._fps_tick = 0 | 32 self._fps_tick = 0 |
33 | 33 |
34 | 34 |
35 @cython.cdivision(True) | 35 @cython.cdivision(True) |
36 cdef void tick(self) nogil except *: | 36 cdef bint tick(self) nogil except True: |
37 current = sdl.get_ticks() | 37 current = sdl.get_ticks() |
38 | 38 |
39 if not self._ref_tick: | 39 if not self._ref_tick: |
40 self._ref_tick = current | 40 self._ref_tick = current |
41 self._ref_frame = 0 | 41 self._ref_frame = 0 |
63 self._ref_frame = 0 | 63 self._ref_frame = 0 |
64 | 64 |
65 | 65 |
66 | 66 |
67 cdef class Runner: | 67 cdef class Runner: |
68 cdef void start(self) except *: | 68 cdef bint start(self) except True: |
69 pass | 69 pass |
70 | 70 |
71 cdef void finish(self) except *: | 71 cdef bint finish(self) except True: |
72 pass | 72 pass |
73 | 73 |
74 cpdef bint update(self, bint render) except -1: | 74 cpdef bint update(self, bint render) except -1: |
75 return False | 75 return False |
76 | 76 |