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

Allow scoped extern(C) declarations #64

Open
rsaarelm opened this issue Mar 15, 2024 · 1 comment
Open

Allow scoped extern(C) declarations #64

rsaarelm opened this issue Mar 15, 2024 · 1 comment

Comments

@rsaarelm
Copy link

This lets you write FFI functions like

void foo() {  // Neat function in module namespace
  extern(C) void foo();  // C function with same name in wrapper implementation namespace
  ...
}
@FeepingCreature
Copy link
Contributor

Yeah extern(C)s should really be declarations probably. That whole piece of compiler machinery was added after extern declarations, which is why you can declare structs in a function but not externs.

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