Skip to content

Failed to generate bindings for SDL 3.2.4 #1

Open
@RoqueDeicide

Description

@RoqueDeicide

My setup.py:

# NOTE: this is relative to `sdl_parser.py` if a relative path.
SDL_ROOT = "../SDL3Source/include/"


# NOTE: these are relative paths from SDL_ROOT,
# which defaults to "include" in the root of the project.
# All these paths should be reasonable defaults.
# Uncomment and change as needed.
PATH_BY_UNIT = {
    # "SDL": "SDL2/SDL.h",
     "SDL": "SDL3/SDL.h",
    # "SDL_main": "SDL3/SDL_main.h",
    # "SDL_vulkan": "SDL3/SDL_vulkan.h",
    # "SDL_image": "SDL3_image/SDL_image.h",
    # "SDL_mixer": "SDL3_mixer/SDL_mixer.h",
    # "SDL_ttf": "SDL3_ttf/SDL_ttf.h",
}

Command and its output:

python3 sdl_parser.py gen.cpp --module="sdl.raw.{ext}"
Note: Skipping SDL_Swap16 due to unnamed parameter
Note: Skipping SDL_Swap32 due to unnamed parameter
Note: Skipping SDL_Swap64 due to unnamed parameter
Note: Skipping _SDL_bsr_watcom due to unnamed parameter
Traceback (most recent call last):
  File "D:\Code\SDL_parser\sdl_parser.py", line 286, in <module>
    main()
  File "D:\Code\SDL_parser\sdl_parser.py", line 268, in main
    vis.visit(rules)
  File "D:\Code\SDL_parser\visitor.py", line 58, in visit
    self.visit_bitflag(rules)
  File "D:\Code\SDL_parser\gen\cpp.py", line 290, in visit_bitflag
    clean_name = _cut_similarity(
  File "D:\Code\SDL_parser\gen\cpp.py", line 67, in _cut_similarity
    if target[ti] == "_":
IndexError: string index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions