Clang.jl generates lower case structs

I am trying to make a wrapper for a C-library and everything seems to work nicely except that Clang.jl emits the struct names in lower case. I guess I am missing something in the the generate.jl script?

I guess they’re all in lower case in C? generate.jl doesn’t automatically Julian-lize those C-library APIs, but you could easily do it by yourself. For example, instead of directly dumping ctx.common_buffer, you could apply a function that can filter and replace those lower case struct names to whatever you prefer.

If you’re not familiar with Julia’s AST, you can also directly overload wrap! and edit this line.

1 Like

Yes, they are in lower case in C, I just thought it would be cleaner if the generated files are used without hand editing… Maybe a sed script would be the simplest way to accomplish this :slight_smile:. Thanks.