Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-506] Problems loading C typedefs and defines #43123

Closed
swift-ci opened this issue Jan 9, 2016 · 0 comments
Closed

[SR-506] Problems loading C typedefs and defines #43123

swift-ci opened this issue Jan 9, 2016 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 9, 2016

Previous ID SR-506
Radar None
Original Reporter rfdickerson (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Ubuntu Linux 15.10

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, Linux
Assignee None
Priority Medium

md5: a685498436985e31805104d31f31ff94

relates to:

  • SR-141 Complex C header files macros are ignored

Issue Description:

I am integrating libSDL2 with Swift with a modulemap. Many of the simple functions that take simple arguments works, for instance SDL_Init() and SDL_VideoInit().

However, the compiler cannot find SDL_Window or SDL_WINDOWPOS_CENTERED.

SDL_Window is defined as:
typedef struct SDL_Window SDL_Window;

and SDL_WINDOWPOS_CENTERED as:

#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X) \
(((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux
Projects
None yet
Development

No branches or pull requests

1 participant