.cargo/vendor/cbindgen/tests/expectations/alias.compat.c
raw| 1 | #include <stdarg.h> |
| 2 | #include <stdbool.h> |
| 3 | #include <stdint.h> |
| 4 | #include <stdlib.h> |
| 5 | |
| 6 | enum Status |
| 7 | #ifdef __cplusplus |
| 8 | : uint32_t |
| 9 | #endif // __cplusplus |
| 10 | { |
| 11 | Ok, |
| 12 | Err, |
| 13 | }; |
| 14 | #ifndef __cplusplus |
| 15 | typedef uint32_t Status; |
| 16 | #endif // __cplusplus |
| 17 | |
| 18 | typedef struct { |
| 19 | int32_t a; |
| 20 | float b; |
| 21 | } Dep; |
| 22 | |
| 23 | typedef struct { |
| 24 | int32_t a; |
| 25 | int32_t b; |
| 26 | Dep c; |
| 27 | } Foo_i32; |
| 28 | |
| 29 | typedef Foo_i32 IntFoo; |
| 30 | |
| 31 | typedef struct { |
| 32 | double a; |
| 33 | double b; |
| 34 | Dep c; |
| 35 | } Foo_f64; |
| 36 | |
| 37 | typedef Foo_f64 DoubleFoo; |
| 38 | |
| 39 | typedef int32_t Unit; |
| 40 | |
| 41 | typedef Status SpecialStatus; |
| 42 | |
| 43 | #ifdef __cplusplus |
| 44 | extern "C" { |
| 45 | #endif // __cplusplus |
| 46 | |
| 47 | void root(IntFoo x, DoubleFoo y, Unit z, SpecialStatus w); |
| 48 | |
| 49 | #ifdef __cplusplus |
| 50 | } // extern "C" |
| 51 | #endif // __cplusplus |