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

Export variables #150

Open
keynmol opened this issue Jan 29, 2023 · 1 comment
Open

Export variables #150

keynmol opened this issue Jan 29, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@keynmol
Copy link
Contributor

keynmol commented Jan 29, 2023

They are present in the AST, but aren't exported.

~/p/wonk (main) > cat test.c
extern int hello;

~/p/wonk (main) > bindgen --header test.c --package bla --scala --warning
package bla

import scala.scalanative.unsafe.*
import scala.scalanative.unsigned.*
import scalanative.libc.*
import scalanative.*

~/p/wonk (main) > clang -Xclang -ast-dump -fsyntax-only test.c | grep hello
`-VarDecl 0x15a0ddf98 <test.c:1:1, col:12> col:12 hello 'int' extern

This should generate a

@extern
object variables:
  var hello: CInt = extern
@keynmol keynmol added the enhancement New feature or request label Jan 29, 2023
@keynmol keynmol added this to the 0.1.0 milestone Jan 29, 2023
@keynmol keynmol removed this from the 0.1.0 milestone Mar 4, 2024
@mio-19
Copy link

mio-19 commented Sep 15, 2024

I need it

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

No branches or pull requests

2 participants