@@ -121,7 +121,7 @@ def messagebox(title, message,
121121 data.numbuttons = 1
122122 else :
123123 buttons_utf8 = [s.encode(' utf8' ) for s in buttons]
124- data.numbuttons = len (buttons)
124+ data.numbuttons = < int > len (buttons)
125125 c_buttons = \
126126 < SDL_MessageBoxButtonData* > malloc(data.numbuttons * sizeof(SDL_MessageBoxButtonData))
127127 if not c_buttons:
@@ -459,10 +459,10 @@ cdef class Texture:
459459 SDL_GetTextureColorMod(self ._tex, & _r_mod, & _g_mod, & _b_mod)
460460 SDL_GetTextureAlphaMod(self ._tex, & _a_mod)
461461
462- cdef float r_mod = float ( _r_mod) / 255.0
463- cdef float g_mod = float ( _g_mod) / 255.0
464- cdef float b_mod = float ( _b_mod) / 255.0
465- cdef float a_mod = float ( _a_mod) / 255.0
462+ cdef float r_mod = < float > _r_mod / < float > 255.0
463+ cdef float g_mod = < float > _g_mod / < float > 255.0
464+ cdef float b_mod = < float > _b_mod / < float > 255.0
465+ cdef float a_mod = < float > _a_mod / < float > 255.0
466466
467467 cdef SDL_Vertex vertices[3 ]
468468 for i, vert in enumerate (((p1_xy, p1_mod, p1_uv),
@@ -508,10 +508,10 @@ cdef class Texture:
508508 SDL_GetTextureColorMod(self ._tex, & _r_mod, & _g_mod, & _b_mod)
509509 SDL_GetTextureAlphaMod(self ._tex, & _a_mod)
510510
511- cdef float r_mod = float ( _r_mod) / 255.0
512- cdef float g_mod = float ( _g_mod) / 255.0
513- cdef float b_mod = float ( _b_mod) / 255.0
514- cdef float a_mod = float ( _a_mod) / 255.0
511+ cdef float r_mod = < float > _r_mod / < float > 255.0
512+ cdef float g_mod = < float > _g_mod / < float > 255.0
513+ cdef float b_mod = < float > _b_mod / < float > 255.0
514+ cdef float a_mod = < float > _a_mod / < float > 255.0
515515
516516 cdef SDL_Vertex vertices[6 ]
517517 for i, vert in enumerate (((p1_xy, p1_mod, p1_uv),
0 commit comments