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

Request: Option to merge/batch function signatures and emit them in a single extern "C" block. #1742

Closed
Lokathor opened this issue Mar 8, 2020 · 3 comments

Comments

@Lokathor
Copy link
Contributor

Lokathor commented Mar 8, 2020

Instead of code like

extern "C" {
  pub fn SDL_LockAudio();
}
extern "C" {
  pub fn SDL_LockAudioDevice(dev: SDL_AudioDeviceID);
}
extern "C" {
  pub fn SDL_UnlockAudio();
}

Emit something like

extern "C" {
  pub fn SDL_LockAudio();
  pub fn SDL_LockAudioDevice(dev: SDL_AudioDeviceID);
  pub fn SDL_UnlockAudio();
}

(I'm not sure if I've requested this before but I didn't see it in the tracker)

@emilio
Copy link
Contributor

emilio commented Mar 11, 2020

There's previous requests like this in #1261. The somewhat complicated part is that since we don't have any ordering guarantees, each item needs to be able to generate itself. We could try to merge adjacent items or such but that'd be non-obvious.

I think it'd be less-hackily-solvable with something like #1743 or such

@emilio emilio closed this as completed Mar 11, 2020
@Lokathor
Copy link
Contributor Author

Did you mean to close this? It seems like it might be blocked on #1743 but once that is done i think this would be a separate issue.

@emilio
Copy link
Contributor

emilio commented Mar 11, 2020

Yeah, I intended to close it but because #564 is a dupe of this, sorry, should've pointed it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants