fix: resolve path types for 'both' style

This commit is contained in:
Wodann
2020-11-01 13:59:41 +01:00
committed by Emilio Cobos Álvarez
parent 85a2f4c956
commit 5b5b46b7d6
168 changed files with 1226 additions and 479 deletions
+21
View File
@@ -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,
) {}
+23
View File
@@ -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
"""