Source

pysdl-cffi / sdl / __init__.py

Full commit
from __future__ import (print_function, division, absolute_import)

from ._sdl import *

################################################################################

def SDL_Init(*args):
    result = _SDL_Init(*args)
    SDL_ClearError()
    return result

def SDL_GetError():
    return _ffi.string(_SDL_GetError()) 

def SDL_PollEvent():
    event = _ffi.new('SDL_Event *')
    if not _SDL_PollEvent(event):
        return None
    return event

################################################################################

# add wrapped functions
_module_names = set(locals().keys())
def get_mangled_names():
    for name in UNMANGLED_EXPORTS:
        mangled_name = name.lstrip('_')
        if mangled_name in _module_names:
            yield mangled_name
        else:
            yield name 
__all__ = EXPORTS + list(get_mangled_names())
del _module_names