| 1 |
#define CF_SWIFT_NAME(_name) __attribute__((swift_name(#_name))) |
| 2 |
|
| 3 |
#include <cstdarg> |
| 4 |
#include <cstdint> |
| 5 |
#include <cstdlib> |
| 6 |
#include <ostream> |
| 7 |
#include <new> |
| 8 |
|
| 9 |
template<typename T = void> |
| 10 |
struct Box; |
| 11 |
|
| 12 |
struct Opaque; |
| 13 |
|
| 14 |
struct SelfTypeTestStruct { |
| 15 |
uint8_t times; |
| 16 |
}; |
| 17 |
|
| 18 |
struct PointerToOpaque { |
| 19 |
Opaque *ptr; |
| 20 |
}; |
| 21 |
|
| 22 |
extern "C" { |
| 23 |
|
| 24 |
void rust_print_hello_world() CF_SWIFT_NAME(rust_print_hello_world()); |
| 25 |
|
| 26 |
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:)); |
| 27 |
|
| 28 |
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:)); |
| 29 |
|
| 30 |
void SelfTypeTestStruct_should_not_exist_box(Box<SelfTypeTestStruct> self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:)); |
| 31 |
|
| 32 |
Box<SelfTypeTestStruct> SelfTypeTestStruct_should_not_exist_return_box() CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box()); |
| 33 |
|
| 34 |
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:)); |
| 35 |
|
| 36 |
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:)); |
| 37 |
|
| 38 |
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:)); |
| 39 |
|
| 40 |
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:)); |
| 41 |
|
| 42 |
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:)); |
| 43 |
|
| 44 |
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:)); |
| 45 |
|
| 46 |
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:)); |
| 47 |
|
| 48 |
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:)); |
| 49 |
|
| 50 |
void unnamed_argument(SelfTypeTestStruct*); |
| 51 |
|
| 52 |
void free_function_should_not_exist_box(Box<SelfTypeTestStruct> boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:)); |
| 53 |
|
| 54 |
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:)); |
| 55 |
|
| 56 |
void free_function_should_exist_annotated_mut_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_mut_by_name(test_struct:)); |
| 57 |
|
| 58 |
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:)); |
| 59 |
|
| 60 |
void PointerToOpaque_sayHello(PointerToOpaque self) CF_SWIFT_NAME(PointerToOpaque.sayHello(self:)); |
| 61 |
|
| 62 |
} // extern "C" |