pombreda / pgreloaded

Automatically exported from code.google.com/p/pgreloaded
Other
0 stars 0 forks source link

Constant type conflict in sdl/hints.py #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
SDL_HINT_WHATEVER constants are defined like:

SDL_HINT_VIDEO_X11_XVIDMODE       = b"SDL_VIDEO_X11_XVIDMODE"

However, the function wrappers insist on the parameters being of type 'str':

    if type(name) is not str:
        raise TypeError("name must be a string")

while this works on python 2.7 where str == bytes, it breaks completely on 
python 3+. I'm not really sure what is the best way here, remove 'b' from 
constants, or do something like in the patch attached.

Original issue reported on code.google.com by llxxn...@gmail.com on 17 Nov 2012 at 3:28

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by marcusvonappen@googlemail.com on 17 Nov 2012 at 8:20

GoogleCodeExporter commented 9 years ago
It has been fixed in revision f42e725d9b6b. Thanks!

Original comment by marcusvonappen@googlemail.com on 18 Nov 2012 at 8:50