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

typedef enum does not correctly type the name #213

Closed
samuelpowell opened this issue Nov 12, 2018 · 1 comment
Closed

typedef enum does not correctly type the name #213

samuelpowell opened this issue Nov 12, 2018 · 1 comment

Comments

@samuelpowell
Copy link
Contributor

If I try to wrap the following header:

typedef enum _foo {
  BAR,
  BAZ
} foo;

using the following script:

using Clang.wrap_c

const context = wrap_c.init(
    headers = [joinpath(@__DIR__, "header.h")],
    common_file = joinpath(@__DIR__, "wrapper.jl"),
    clang_diagnostics = true,
)

run(context)

I get the following wrapper:

# begin enum _foo
const _foo = UInt32
const BAR = 0 |> UInt32
const BAZ = 1 |> UInt32
# end enum _foo

const foo = Cvoid

I was expecting that the typedef name const foo = UInt32 or const foo = _foo.

xref discourse thread

@Gnimuc
Copy link
Member

Gnimuc commented Dec 23, 2018

fixed in #216

@Gnimuc Gnimuc closed this as completed Dec 23, 2018
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