Open hfiguiere opened 6 years ago
Removing the #[repr(C)]
works around the problem in my case.
The problem here is that we don't do an analysis on #[repr(C)]
types to see if they actually contain only #[repr(C)]
types. We should add one, and drop any #[repr(C)]
types that don't pass with a warning.
The following code:
generates invalid C/C++ code with cbindgen. The problem lies in:
String
is declared as opaque, but then used as if it wasn't.I'm not sure what the proper solution would be short of ignoring the enum altogether.