Mercurial > touhou
comparison pytouhou/lib/sdl.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 | aca9551ee8b4 |
children | 73f134f84c7f |
comparison
equal
deleted
inserted
replaced
605:d6ead6f0ba80 | 606:3c2f96f1d715 |
---|---|
199 | 199 |
200 property pixels: | 200 property pixels: |
201 def __get__(self): | 201 def __get__(self): |
202 return bytes(self.surface.pixels[:self.surface.w * self.surface.h * 4]) | 202 return bytes(self.surface.pixels[:self.surface.w * self.surface.h * 4]) |
203 | 203 |
204 cdef void blit(self, Surface other): | 204 cdef void blit(self, Surface other) except *: |
205 if SDL_BlitSurface(other.surface, NULL, self.surface, NULL) < 0: | 205 if SDL_BlitSurface(other.surface, NULL, self.surface, NULL) < 0: |
206 raise SDLError() | 206 raise SDLError() |
207 | 207 |
208 cdef void set_alpha(self, Surface alpha_surface) nogil: | 208 cdef void set_alpha(self, Surface alpha_surface) nogil: |
209 nb_pixels = self.surface.w * self.surface.h | 209 nb_pixels = self.surface.w * self.surface.h |