comparison pytouhou/lib/sdl.pyx @ 491:2276229282fd

Fix gcc’s warnings with -Wall -Wextra.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 04 Oct 2013 14:32:28 +0200
parents 36bc577b2392
children 4778c482f24a
comparison
equal deleted inserted replaced
490:1b532e7dd521 491:2276229282fd
165 cdef void init(Uint32 flags) except *: 165 cdef void init(Uint32 flags) except *:
166 if SDL_Init(flags) < 0: 166 if SDL_Init(flags) < 0:
167 raise SDLError(SDL_GetError()) 167 raise SDLError(SDL_GetError())
168 168
169 169
170 cdef void img_init(Uint32 flags) except *: 170 cdef void img_init(int flags) except *:
171 if IMG_Init(flags) != flags: 171 if IMG_Init(flags) != flags:
172 raise SDLError(SDL_GetError()) 172 raise SDLError(SDL_GetError())
173 173
174 174
175 cdef void mix_init(int flags) except *: 175 cdef void mix_init(int flags) except *:
178 178
179 179
180 cdef void ttf_init() except *: 180 cdef void ttf_init() except *:
181 if TTF_Init() < 0: 181 if TTF_Init() < 0:
182 raise SDLError(SDL_GetError()) 182 raise SDLError(SDL_GetError())
183
184
185 cdef void quit() nogil:
186 SDL_Quit()
187
188
189 cdef void img_quit() nogil:
190 IMG_Quit()
191
192
193 cdef void mix_quit() nogil:
194 Mix_Quit()
195
196
197 cdef void ttf_quit() nogil:
198 TTF_Quit()
199 183
200 184
201 cdef void gl_set_attribute(SDL_GLattr attr, int value) except *: 185 cdef void gl_set_attribute(SDL_GLattr attr, int value) except *:
202 if SDL_GL_SetAttribute(attr, value) < 0: 186 if SDL_GL_SetAttribute(attr, value) < 0:
203 raise SDLError(SDL_GetError()) 187 raise SDLError(SDL_GetError())