fix: resolve path types for 'both' style
This commit is contained in:
committed by
Emilio Cobos Álvarez
parent
85a2f4c956
commit
5b5b46b7d6
@@ -0,0 +1,21 @@
|
||||
#[repr(C)]
|
||||
struct TypeInfo {
|
||||
data: TypeData,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
enum TypeData {
|
||||
Primitive,
|
||||
Struct(StructInfo),
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct StructInfo {
|
||||
fields: *const *const TypeInfo, // requires forward declaration
|
||||
num_fields: usize,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn root(
|
||||
x: TypeInfo,
|
||||
) {}
|
||||
@@ -0,0 +1,23 @@
|
||||
header = """
|
||||
#if 0
|
||||
''' '
|
||||
#endif
|
||||
#if defined(CBINDGEN_STYLE_TYPE)
|
||||
/* ANONYMOUS STRUCTS DO NOT SUPPORT FORWARD DECLARATIONS!
|
||||
#endif
|
||||
#if 0
|
||||
' '''
|
||||
#endif
|
||||
"""
|
||||
|
||||
trailer = """
|
||||
#if 0
|
||||
''' '
|
||||
#endif
|
||||
#if defined(CBINDGEN_STYLE_TYPE)
|
||||
*/
|
||||
#endif
|
||||
#if 0
|
||||
' '''
|
||||
#endif
|
||||
"""
|
||||
Reference in New Issue
Block a user