lassade / c2z

C++ to Zig bindings and transpiler
100 stars 7 forks source link

Handle function parameters that match zig keywords #31

Open Srekel opened 3 hours ago

Srekel commented 3 hours ago

Upon binding The-Forge, we found a case where it has a function with a parameter called align. This causes a compile error because align is also a Zig keyword. c2z should replace it with @"align".

I believe this is done in one or two other places so hopefully should be a function call that's needed somewhere. :)

Srekel commented 3 hours ago

Related, it seems to use @"lol" unnecessarily when generating the pub extern fn lol names. I don't think this was always the case?