Switch default sorting order for items to "None"
This commit is contained in:
committed by
Emilio Cobos Álvarez
parent
ea919a4edf
commit
aeb69bcc69
@@ -688,8 +688,8 @@ rename_args = "PascalCase"
|
||||
# "Name": sort by the name of the function
|
||||
# "None": keep order in which the functions have been parsed
|
||||
#
|
||||
# default: "Name"
|
||||
sort_by = "None"
|
||||
# default: "None"
|
||||
sort_by = "Name"
|
||||
|
||||
[struct]
|
||||
# A rule to use to rename struct field names. The renaming assumes the input is
|
||||
@@ -890,8 +890,8 @@ allow_constexpr = false
|
||||
# "Name": sort by the name of the constant
|
||||
# "None": keep order in which the constants have been parsed
|
||||
#
|
||||
# default: "Name"
|
||||
sort_by = "None"
|
||||
# default: "None"
|
||||
sort_by = "Name"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -894,7 +894,7 @@ impl Default for Config {
|
||||
language: Language::Cxx,
|
||||
cpp_compat: false,
|
||||
style: Style::Type,
|
||||
sort_by: SortKey::Name,
|
||||
sort_by: SortKey::None,
|
||||
macro_expansion: Default::default(),
|
||||
parse: ParseConfig::default(),
|
||||
export: ExportConfig::default(),
|
||||
|
||||
@@ -17,8 +17,8 @@ typedef struct MyStruct {
|
||||
int32_t *number;
|
||||
} MyStruct;
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
void drop_box(int32_t *x);
|
||||
|
||||
void drop_box_opt(int32_t *x);
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
@@ -21,12 +21,12 @@ typedef struct MyStruct {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
void drop_box(int32_t *x);
|
||||
|
||||
void drop_box_opt(int32_t *x);
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,19 +3,28 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CAST (uint8_t)'A'
|
||||
#define FOO 10
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
#define EQUID U'\U00010083'
|
||||
#define QUOTE '\''
|
||||
|
||||
#define FOO 10
|
||||
#define TAB '\t'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
#define HEART U'\U00002764'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
#define EQUID U'\U00010083'
|
||||
|
||||
#define ZOM 3.14
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
/**
|
||||
* A
|
||||
@@ -25,26 +34,17 @@
|
||||
*/
|
||||
#define NEG_ONE -1
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
#define QUOTE '\''
|
||||
|
||||
#define SHIFT 3
|
||||
|
||||
#define TAB '\t'
|
||||
|
||||
#define XBOOL 1
|
||||
|
||||
#define XFALSE ((0 << SHIFT) | XBOOL)
|
||||
|
||||
#define XTRUE (1 << (SHIFT | XBOOL))
|
||||
|
||||
#define ZOM 3.14
|
||||
#define CAST (uint8_t)'A'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
|
||||
typedef struct Foo {
|
||||
int32_t x[FOO];
|
||||
|
||||
@@ -3,19 +3,28 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CAST (uint8_t)'A'
|
||||
#define FOO 10
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
#define EQUID U'\U00010083'
|
||||
#define QUOTE '\''
|
||||
|
||||
#define FOO 10
|
||||
#define TAB '\t'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
#define HEART U'\U00002764'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
#define EQUID U'\U00010083'
|
||||
|
||||
#define ZOM 3.14
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
/**
|
||||
* A
|
||||
@@ -25,26 +34,17 @@
|
||||
*/
|
||||
#define NEG_ONE -1
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
#define QUOTE '\''
|
||||
|
||||
#define SHIFT 3
|
||||
|
||||
#define TAB '\t'
|
||||
|
||||
#define XBOOL 1
|
||||
|
||||
#define XFALSE ((0 << SHIFT) | XBOOL)
|
||||
|
||||
#define XTRUE (1 << (SHIFT | XBOOL))
|
||||
|
||||
#define ZOM 3.14
|
||||
#define CAST (uint8_t)'A'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
|
||||
typedef struct Foo {
|
||||
int32_t x[FOO];
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
|
||||
#define UNSIGNED_DOESNT_NEED_ULL_SUFFIX 8070450532247928832
|
||||
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
|
||||
#define UNSIGNED_DOESNT_NEED_ULL_SUFFIX 8070450532247928832
|
||||
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define CONSTANT_I64 216
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define CONSTANT_I64 216
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
@@ -7,8 +7,8 @@ typedef struct Foo {
|
||||
|
||||
} Foo;
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void extra_debug_fn(void);
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
@@ -11,10 +11,10 @@ typedef struct Foo {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void extra_debug_fn(void);
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -8,6 +8,6 @@ typedef struct Normal {
|
||||
float y;
|
||||
} Normal;
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
extern int32_t foo(void);
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
@@ -12,10 +12,10 @@ typedef struct Normal {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
extern int32_t foo(void);
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -11,6 +11,6 @@ typedef struct Fns {
|
||||
int8_t (*namedArgsWildcards)(int32_t _, int16_t named, int64_t _1);
|
||||
} Fns;
|
||||
|
||||
void no_return(void);
|
||||
|
||||
void root(Fns _fns);
|
||||
|
||||
void no_return(void);
|
||||
|
||||
@@ -15,10 +15,10 @@ typedef struct Fns {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void no_return(void);
|
||||
|
||||
void root(Fns _fns);
|
||||
|
||||
void no_return(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
void pointer_test(const uint64_t *a);
|
||||
|
||||
void print_from_rust(void);
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
void pointer_test(const uint64_t *a);
|
||||
|
||||
void print_from_rust(void);
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
extern char MUT_GLOBAL_ARRAY[128];
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
extern char MUT_GLOBAL_ARRAY[128];
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,18 +3,12 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(BAR)
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
#define FOO 1
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
typedef struct Bar {
|
||||
|
||||
} Bar;
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
@@ -24,9 +18,15 @@ typedef struct Foo {
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
typedef struct Bar {
|
||||
|
||||
} Bar;
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
void foo(const Foo *foo);
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
#endif
|
||||
|
||||
@@ -3,18 +3,12 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(BAR)
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
#define FOO 1
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
typedef struct Bar {
|
||||
|
||||
} Bar;
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
@@ -23,18 +17,24 @@ typedef struct Foo {
|
||||
} Foo;
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
typedef struct Bar {
|
||||
|
||||
} Bar;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
void foo(const Foo *foo);
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -7,16 +7,16 @@ typedef struct A A;
|
||||
|
||||
typedef struct B B;
|
||||
|
||||
typedef struct List_B {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
typedef struct List_A {
|
||||
A *members;
|
||||
uintptr_t count;
|
||||
} List_A;
|
||||
|
||||
void bar(List_B b);
|
||||
typedef struct List_B {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
void foo(List_A a);
|
||||
|
||||
void bar(List_B b);
|
||||
|
||||
@@ -7,24 +7,24 @@ typedef struct A A;
|
||||
|
||||
typedef struct B B;
|
||||
|
||||
typedef struct List_B {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
typedef struct List_A {
|
||||
A *members;
|
||||
uintptr_t count;
|
||||
} List_A;
|
||||
|
||||
typedef struct List_B {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void bar(List_B b);
|
||||
|
||||
void foo(List_A a);
|
||||
|
||||
void bar(List_B b);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct References {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
typedef struct Pointers_u64 {
|
||||
float *CBINDGEN_NONNULL a;
|
||||
uint64_t *CBINDGEN_NONNULL b;
|
||||
@@ -26,27 +33,20 @@ typedef struct Pointers_u64 {
|
||||
uint64_t *k;
|
||||
} Pointers_u64;
|
||||
|
||||
typedef struct References {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
void value_arg(References arg);
|
||||
|
||||
void mutltiple_args(int32_t *CBINDGEN_NONNULL arg,
|
||||
Pointers_u64 *foo,
|
||||
Opaque *CBINDGEN_NONNULL *CBINDGEN_NONNULL d);
|
||||
|
||||
void nullable_const_ptr(const Pointers_u64 *arg);
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void nullable_mut_ptr(Pointers_u64 *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void optional_ref_arg(const Pointers_u64 *arg);
|
||||
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
|
||||
void value_arg(References arg);
|
||||
void nullable_const_ptr(const Pointers_u64 *arg);
|
||||
|
||||
void nullable_mut_ptr(Pointers_u64 *arg);
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct References {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
typedef struct Pointers_u64 {
|
||||
float *CBINDGEN_NONNULL a;
|
||||
uint64_t *CBINDGEN_NONNULL b;
|
||||
@@ -26,35 +33,28 @@ typedef struct Pointers_u64 {
|
||||
uint64_t *k;
|
||||
} Pointers_u64;
|
||||
|
||||
typedef struct References {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
void value_arg(References arg);
|
||||
|
||||
void mutltiple_args(int32_t *CBINDGEN_NONNULL arg,
|
||||
Pointers_u64 *foo,
|
||||
Opaque *CBINDGEN_NONNULL *CBINDGEN_NONNULL d);
|
||||
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void optional_ref_arg(const Pointers_u64 *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
|
||||
void nullable_const_ptr(const Pointers_u64 *arg);
|
||||
|
||||
void nullable_mut_ptr(Pointers_u64 *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
|
||||
void optional_ref_arg(const Pointers_u64 *arg);
|
||||
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void value_arg(References arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -9,6 +9,6 @@ void ptr_as_array1(uint32_t n, const uint32_t arg[3], uint64_t v[4]);
|
||||
|
||||
void ptr_as_array2(uint32_t n, uint32_t arg[], const uint64_t v[]);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
void ptr_as_array_wrong_syntax(uint32_t *arg, const uint32_t *v, const uint32_t*);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
@@ -13,10 +13,10 @@ void ptr_as_array1(uint32_t n, const uint32_t arg[3], uint64_t v[4]);
|
||||
|
||||
void ptr_as_array2(uint32_t n, uint32_t arg[], const uint64_t v[]);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
void ptr_as_array_wrong_syntax(uint32_t *arg, const uint32_t *v, const uint32_t*);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct Foo {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
typedef struct RenamedTy {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
#if !defined(DEFINE_FREEBSD)
|
||||
typedef struct NoExternTy {
|
||||
uint8_t field;
|
||||
@@ -21,16 +29,8 @@ typedef struct ContainsNoExternTy {
|
||||
} ContainsNoExternTy;
|
||||
#endif
|
||||
|
||||
typedef struct RenamedTy {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
typedef struct Foo {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
void root(Foo a);
|
||||
|
||||
void renamed_func(RenamedTy a);
|
||||
|
||||
void root(Foo a);
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct Foo {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
typedef struct RenamedTy {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
#if !defined(DEFINE_FREEBSD)
|
||||
typedef struct NoExternTy {
|
||||
uint8_t field;
|
||||
@@ -21,23 +29,15 @@ typedef struct ContainsNoExternTy {
|
||||
} ContainsNoExternTy;
|
||||
#endif
|
||||
|
||||
typedef struct RenamedTy {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
typedef struct Foo {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
void root(Foo a);
|
||||
|
||||
void renamed_func(RenamedTy a);
|
||||
|
||||
void root(Foo a);
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@@ -9,10 +9,10 @@ typedef struct Foo {
|
||||
|
||||
} Foo;
|
||||
|
||||
extern const Bar BAR;
|
||||
extern const int32_t NUMBER;
|
||||
|
||||
extern Foo FOO;
|
||||
|
||||
extern const int32_t NUMBER;
|
||||
extern const Bar BAR;
|
||||
|
||||
void root(void);
|
||||
|
||||
@@ -13,11 +13,11 @@ typedef struct Foo {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern const Bar BAR;
|
||||
extern const int32_t NUMBER;
|
||||
|
||||
extern Foo FOO;
|
||||
|
||||
extern const int32_t NUMBER;
|
||||
extern const Bar BAR;
|
||||
|
||||
void root(void);
|
||||
|
||||
|
||||
@@ -7,49 +7,49 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct PointerToOpaque {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
typedef struct SelfTypeTestStruct {
|
||||
uint8_t times;
|
||||
} SelfTypeTestStruct;
|
||||
|
||||
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:));
|
||||
typedef struct PointerToOpaque {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
void PointerToOpaque_sayHello(PointerToOpaque self)
|
||||
/*a comment!*/ CF_SWIFT_NAME(PointerToOpaque.sayHello(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
SelfTypeTestStruct *SelfTypeTestStruct_should_not_exist_return_box(void) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
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:));
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
void free_function_should_not_exist_box(SelfTypeTestStruct *boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
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:));
|
||||
|
||||
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:));
|
||||
|
||||
void PointerToOpaque_sayHello(PointerToOpaque self)
|
||||
/*a comment!*/ CF_SWIFT_NAME(PointerToOpaque.sayHello(self:));
|
||||
|
||||
@@ -7,57 +7,57 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct PointerToOpaque {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
typedef struct SelfTypeTestStruct {
|
||||
uint8_t times;
|
||||
} SelfTypeTestStruct;
|
||||
|
||||
typedef struct PointerToOpaque {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
SelfTypeTestStruct *SelfTypeTestStruct_should_not_exist_return_box(void) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
void free_function_should_not_exist_box(SelfTypeTestStruct *boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
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:));
|
||||
|
||||
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:));
|
||||
|
||||
void PointerToOpaque_sayHello(PointerToOpaque self)
|
||||
/*a comment!*/ CF_SWIFT_NAME(PointerToOpaque.sayHello(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
SelfTypeTestStruct *SelfTypeTestStruct_should_not_exist_return_box(void) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
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:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void free_function_should_not_exist_box(SelfTypeTestStruct *boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -17,8 +17,8 @@ typedef struct {
|
||||
int32_t *number;
|
||||
} MyStruct;
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
void drop_box(int32_t *x);
|
||||
|
||||
void drop_box_opt(int32_t *x);
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
@@ -21,12 +21,12 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
void drop_box(int32_t *x);
|
||||
|
||||
void drop_box_opt(int32_t *x);
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -24,10 +24,10 @@ struct MyStruct {
|
||||
|
||||
extern "C" {
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
void drop_box(Box<int32_t> x);
|
||||
|
||||
void drop_box_opt(Option<Box<int32_t>> x);
|
||||
|
||||
void root(const Foo *a, const MyStruct *with_box);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -3,19 +3,28 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CAST (uint8_t)'A'
|
||||
#define FOO 10
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
#define EQUID U'\U00010083'
|
||||
#define QUOTE '\''
|
||||
|
||||
#define FOO 10
|
||||
#define TAB '\t'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
#define HEART U'\U00002764'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
#define EQUID U'\U00010083'
|
||||
|
||||
#define ZOM 3.14
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
/**
|
||||
* A
|
||||
@@ -25,26 +34,17 @@
|
||||
*/
|
||||
#define NEG_ONE -1
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
#define QUOTE '\''
|
||||
|
||||
#define SHIFT 3
|
||||
|
||||
#define TAB '\t'
|
||||
|
||||
#define XBOOL 1
|
||||
|
||||
#define XFALSE ((0 << SHIFT) | XBOOL)
|
||||
|
||||
#define XTRUE (1 << (SHIFT | XBOOL))
|
||||
|
||||
#define ZOM 3.14
|
||||
#define CAST (uint8_t)'A'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
|
||||
typedef struct {
|
||||
int32_t x[FOO];
|
||||
|
||||
@@ -3,19 +3,28 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CAST (uint8_t)'A'
|
||||
#define FOO 10
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
#define EQUID U'\U00010083'
|
||||
#define QUOTE '\''
|
||||
|
||||
#define FOO 10
|
||||
#define TAB '\t'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
#define HEART U'\U00002764'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
#define EQUID U'\U00010083'
|
||||
|
||||
#define ZOM 3.14
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
/**
|
||||
* A
|
||||
@@ -25,26 +34,17 @@
|
||||
*/
|
||||
#define NEG_ONE -1
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
#define QUOTE '\''
|
||||
|
||||
#define SHIFT 3
|
||||
|
||||
#define TAB '\t'
|
||||
|
||||
#define XBOOL 1
|
||||
|
||||
#define XFALSE ((0 << SHIFT) | XBOOL)
|
||||
|
||||
#define XTRUE (1 << (SHIFT | XBOOL))
|
||||
|
||||
#define ZOM 3.14
|
||||
#define CAST (uint8_t)'A'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
|
||||
typedef struct {
|
||||
int32_t x[FOO];
|
||||
|
||||
@@ -4,19 +4,26 @@
|
||||
#include <ostream>
|
||||
#include <new>
|
||||
|
||||
static const uint8_t CAST = (uint8_t)'A';
|
||||
static const int32_t FOO = 10;
|
||||
|
||||
static const uint32_t DELIMITER = ':';
|
||||
|
||||
static const uint32_t DOUBLE_CAST = (uint32_t)(float)1;
|
||||
static const uint32_t LEFTCURLY = '{';
|
||||
|
||||
static const uint32_t EQUID = U'\U00010083';
|
||||
static const uint32_t QUOTE = '\'';
|
||||
|
||||
static const int32_t FOO = 10;
|
||||
static const uint32_t TAB = '\t';
|
||||
|
||||
static const uint32_t NEWLINE = '\n';
|
||||
|
||||
static const uint32_t HEART = U'\U00002764';
|
||||
|
||||
static const uint32_t LEFTCURLY = '{';
|
||||
static const uint32_t EQUID = U'\U00010083';
|
||||
|
||||
static const float ZOM = 3.14;
|
||||
|
||||
/// A single-line doc comment.
|
||||
static const int8_t POS_ONE = 1;
|
||||
|
||||
/// A
|
||||
/// multi-line
|
||||
@@ -24,24 +31,17 @@ static const uint32_t LEFTCURLY = '{';
|
||||
/// comment.
|
||||
static const int8_t NEG_ONE = -1;
|
||||
|
||||
static const uint32_t NEWLINE = '\n';
|
||||
|
||||
/// A single-line doc comment.
|
||||
static const int8_t POS_ONE = 1;
|
||||
|
||||
static const uint32_t QUOTE = '\'';
|
||||
|
||||
static const int64_t SHIFT = 3;
|
||||
|
||||
static const uint32_t TAB = '\t';
|
||||
|
||||
static const int64_t XBOOL = 1;
|
||||
|
||||
static const int64_t XFALSE = ((0 << SHIFT) | XBOOL);
|
||||
|
||||
static const int64_t XTRUE = (1 << (SHIFT | XBOOL));
|
||||
|
||||
static const float ZOM = 3.14;
|
||||
static const uint8_t CAST = (uint8_t)'A';
|
||||
|
||||
static const uint32_t DOUBLE_CAST = (uint32_t)(float)1;
|
||||
|
||||
struct Foo {
|
||||
int32_t x[FOO];
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
|
||||
#define UNSIGNED_DOESNT_NEED_ULL_SUFFIX 8070450532247928832
|
||||
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
|
||||
#define UNSIGNED_DOESNT_NEED_ULL_SUFFIX 8070450532247928832
|
||||
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include <ostream>
|
||||
#include <new>
|
||||
|
||||
static const int64_t SIGNED_DOESNT_NEED_ULL_SUFFIX = -9223372036854775807;
|
||||
|
||||
static const int64_t SIGNED_NEEDS_ULL_SUFFIX = -9223372036854775808ULL;
|
||||
static const uint64_t UNSIGNED_NEEDS_ULL_SUFFIX = 9223372036854775808ULL;
|
||||
|
||||
static const uint64_t UNSIGNED_DOESNT_NEED_ULL_SUFFIX = 8070450532247928832;
|
||||
|
||||
static const uint64_t UNSIGNED_NEEDS_ULL_SUFFIX = 9223372036854775808ULL;
|
||||
static const int64_t SIGNED_NEEDS_ULL_SUFFIX = -9223372036854775808ULL;
|
||||
|
||||
static const int64_t SIGNED_DOESNT_NEED_ULL_SUFFIX = -9223372036854775807;
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define CONSTANT_I64 216
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define CONSTANT_I64 216
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#include <ostream>
|
||||
#include <new>
|
||||
|
||||
constexpr static const float CONSTANT_FLOAT32 = 312.292;
|
||||
|
||||
constexpr static const int64_t CONSTANT_I64 = 216;
|
||||
|
||||
constexpr static const float CONSTANT_FLOAT32 = 312.292;
|
||||
|
||||
constexpr static const uint32_t DELIMITER = ':';
|
||||
|
||||
constexpr static const uint32_t LEFTCURLY = '{';
|
||||
|
||||
@@ -7,8 +7,8 @@ typedef struct {
|
||||
|
||||
} Foo;
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void extra_debug_fn(void);
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
@@ -11,10 +11,10 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void extra_debug_fn(void);
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -10,10 +10,10 @@ struct Foo {
|
||||
|
||||
extern "C" {
|
||||
|
||||
void cbindgen();
|
||||
|
||||
void extra_debug_fn();
|
||||
|
||||
void cbindgen();
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -8,6 +8,6 @@ typedef struct {
|
||||
float y;
|
||||
} Normal;
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
extern int32_t foo(void);
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
@@ -12,10 +12,10 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
extern int32_t foo(void);
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -11,8 +11,8 @@ struct Normal {
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
extern int32_t foo();
|
||||
|
||||
extern void bar(Normal a);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -11,6 +11,6 @@ typedef struct {
|
||||
int8_t (*namedArgsWildcards)(int32_t _, int16_t named, int64_t _1);
|
||||
} Fns;
|
||||
|
||||
void no_return(void);
|
||||
|
||||
void root(Fns _fns);
|
||||
|
||||
void no_return(void);
|
||||
|
||||
@@ -15,10 +15,10 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void no_return(void);
|
||||
|
||||
void root(Fns _fns);
|
||||
|
||||
void no_return(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -14,8 +14,8 @@ struct Fns {
|
||||
|
||||
extern "C" {
|
||||
|
||||
void no_return();
|
||||
|
||||
void root(Fns _fns);
|
||||
|
||||
void no_return();
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
void pointer_test(const uint64_t *a);
|
||||
|
||||
void print_from_rust(void);
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
void pointer_test(const uint64_t *a);
|
||||
|
||||
void print_from_rust(void);
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
void pointer_test(const uint64_t *a);
|
||||
|
||||
void print_from_rust();
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
extern char MUT_GLOBAL_ARRAY[128];
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
extern char MUT_GLOBAL_ARRAY[128];
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
extern char MUT_GLOBAL_ARRAY[128];
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -3,18 +3,12 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(BAR)
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
#define FOO 1
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
typedef struct {
|
||||
|
||||
} Bar;
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
@@ -24,9 +18,15 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
typedef struct {
|
||||
|
||||
} Bar;
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
void foo(const Foo *foo);
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
#endif
|
||||
|
||||
@@ -3,18 +3,12 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(BAR)
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
#define FOO 1
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
typedef struct {
|
||||
|
||||
} Bar;
|
||||
#define BAR 2
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
@@ -23,18 +17,24 @@ typedef struct {
|
||||
} Foo;
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
typedef struct {
|
||||
|
||||
} Bar;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
void foo(const Foo *foo);
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -4,18 +4,12 @@
|
||||
#include <ostream>
|
||||
#include <new>
|
||||
|
||||
#if defined(BAR)
|
||||
static const int32_t BAR = 2;
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
static const int32_t FOO = 1;
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
struct Bar {
|
||||
|
||||
};
|
||||
static const int32_t BAR = 2;
|
||||
#endif
|
||||
|
||||
#if defined(FOO)
|
||||
@@ -24,14 +18,20 @@ struct Foo {
|
||||
};
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
struct Bar {
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
#if defined(FOO)
|
||||
void foo(const Foo *foo);
|
||||
#endif
|
||||
|
||||
#if defined(BAR)
|
||||
void bar(const Bar *bar);
|
||||
#endif
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -7,16 +7,16 @@ typedef struct A A;
|
||||
|
||||
typedef struct B B;
|
||||
|
||||
typedef struct {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
typedef struct {
|
||||
A *members;
|
||||
uintptr_t count;
|
||||
} List_A;
|
||||
|
||||
void bar(List_B b);
|
||||
typedef struct {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
void foo(List_A a);
|
||||
|
||||
void bar(List_B b);
|
||||
|
||||
@@ -7,24 +7,24 @@ typedef struct A A;
|
||||
|
||||
typedef struct B B;
|
||||
|
||||
typedef struct {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
typedef struct {
|
||||
A *members;
|
||||
uintptr_t count;
|
||||
} List_A;
|
||||
|
||||
typedef struct {
|
||||
B *members;
|
||||
uintptr_t count;
|
||||
} List_B;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void bar(List_B b);
|
||||
|
||||
void foo(List_A a);
|
||||
|
||||
void bar(List_B b);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -16,8 +16,8 @@ struct List {
|
||||
|
||||
extern "C" {
|
||||
|
||||
void bar(List<B> b);
|
||||
|
||||
void foo(List<A> a);
|
||||
|
||||
void bar(List<B> b);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
typedef struct {
|
||||
float *CBINDGEN_NONNULL a;
|
||||
uint64_t *CBINDGEN_NONNULL b;
|
||||
@@ -26,27 +33,20 @@ typedef struct {
|
||||
uint64_t *k;
|
||||
} Pointers_u64;
|
||||
|
||||
typedef struct {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
void value_arg(References arg);
|
||||
|
||||
void mutltiple_args(int32_t *CBINDGEN_NONNULL arg,
|
||||
Pointers_u64 *foo,
|
||||
Opaque *CBINDGEN_NONNULL *CBINDGEN_NONNULL d);
|
||||
|
||||
void nullable_const_ptr(const Pointers_u64 *arg);
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void nullable_mut_ptr(Pointers_u64 *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void optional_ref_arg(const Pointers_u64 *arg);
|
||||
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
|
||||
void value_arg(References arg);
|
||||
void nullable_const_ptr(const Pointers_u64 *arg);
|
||||
|
||||
void nullable_mut_ptr(Pointers_u64 *arg);
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
typedef struct {
|
||||
float *CBINDGEN_NONNULL a;
|
||||
uint64_t *CBINDGEN_NONNULL b;
|
||||
@@ -26,35 +33,28 @@ typedef struct {
|
||||
uint64_t *k;
|
||||
} Pointers_u64;
|
||||
|
||||
typedef struct {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
} References;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
void value_arg(References arg);
|
||||
|
||||
void mutltiple_args(int32_t *CBINDGEN_NONNULL arg,
|
||||
Pointers_u64 *foo,
|
||||
Opaque *CBINDGEN_NONNULL *CBINDGEN_NONNULL d);
|
||||
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void optional_ref_arg(const Pointers_u64 *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
|
||||
void nullable_const_ptr(const Pointers_u64 *arg);
|
||||
|
||||
void nullable_mut_ptr(Pointers_u64 *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers_u64 *arg);
|
||||
|
||||
void optional_ref_arg(const Pointers_u64 *arg);
|
||||
|
||||
void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
|
||||
|
||||
void value_arg(References arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -13,6 +13,13 @@
|
||||
|
||||
struct Opaque;
|
||||
|
||||
struct References {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct Pointers {
|
||||
float *CBINDGEN_NONNULL a;
|
||||
@@ -28,31 +35,24 @@ struct Pointers {
|
||||
T *k;
|
||||
};
|
||||
|
||||
struct References {
|
||||
const Opaque *CBINDGEN_NONNULL a;
|
||||
Opaque *CBINDGEN_NONNULL b;
|
||||
const Opaque *c;
|
||||
Opaque *d;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
void mut_ref_arg(Pointers<uint64_t> *CBINDGEN_NONNULL arg);
|
||||
void value_arg(References arg);
|
||||
|
||||
void mutltiple_args(int32_t *CBINDGEN_NONNULL arg,
|
||||
Pointers<uint64_t> *foo,
|
||||
Opaque *CBINDGEN_NONNULL *CBINDGEN_NONNULL d);
|
||||
|
||||
void ref_arg(const Pointers<uint64_t> *CBINDGEN_NONNULL arg);
|
||||
|
||||
void mut_ref_arg(Pointers<uint64_t> *CBINDGEN_NONNULL arg);
|
||||
|
||||
void optional_ref_arg(const Pointers<uint64_t> *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers<uint64_t> *arg);
|
||||
|
||||
void nullable_const_ptr(const Pointers<uint64_t> *arg);
|
||||
|
||||
void nullable_mut_ptr(Pointers<uint64_t> *arg);
|
||||
|
||||
void optional_mut_ref_arg(Pointers<uint64_t> *arg);
|
||||
|
||||
void optional_ref_arg(const Pointers<uint64_t> *arg);
|
||||
|
||||
void ref_arg(const Pointers<uint64_t> *CBINDGEN_NONNULL arg);
|
||||
|
||||
void value_arg(References arg);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -9,6 +9,6 @@ void ptr_as_array1(uint32_t n, const uint32_t arg[3], uint64_t v[4]);
|
||||
|
||||
void ptr_as_array2(uint32_t n, uint32_t arg[], const uint64_t v[]);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
void ptr_as_array_wrong_syntax(uint32_t *arg, const uint32_t *v, const uint32_t*);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
@@ -13,10 +13,10 @@ void ptr_as_array1(uint32_t n, const uint32_t arg[3], uint64_t v[4]);
|
||||
|
||||
void ptr_as_array2(uint32_t n, uint32_t arg[], const uint64_t v[]);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
void ptr_as_array_wrong_syntax(uint32_t *arg, const uint32_t *v, const uint32_t*);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -12,8 +12,8 @@ void ptr_as_array1(uint32_t n, const uint32_t arg[3], uint64_t v[4]);
|
||||
|
||||
void ptr_as_array2(uint32_t n, uint32_t arg[], const uint64_t v[]);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
void ptr_as_array_wrong_syntax(uint32_t *arg, const uint32_t *v, const uint32_t*);
|
||||
|
||||
void ptr_as_array_unnamed(uint32_t*, const uint32_t*);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
typedef struct {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
#if !defined(DEFINE_FREEBSD)
|
||||
typedef struct {
|
||||
uint8_t field;
|
||||
@@ -21,16 +29,8 @@ typedef struct {
|
||||
} ContainsNoExternTy;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
typedef struct {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
void root(Foo a);
|
||||
|
||||
void renamed_func(RenamedTy a);
|
||||
|
||||
void root(Foo a);
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
typedef struct {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
#if !defined(DEFINE_FREEBSD)
|
||||
typedef struct {
|
||||
uint8_t field;
|
||||
@@ -21,23 +29,15 @@ typedef struct {
|
||||
} ContainsNoExternTy;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
uint64_t y;
|
||||
} RenamedTy;
|
||||
|
||||
typedef struct {
|
||||
int32_t x;
|
||||
} Foo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
void root(Foo a);
|
||||
|
||||
void renamed_func(RenamedTy a);
|
||||
|
||||
void root(Foo a);
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
#include <ostream>
|
||||
#include <new>
|
||||
|
||||
struct Foo {
|
||||
int32_t x;
|
||||
};
|
||||
|
||||
struct RenamedTy {
|
||||
uint64_t y;
|
||||
};
|
||||
|
||||
#if !defined(DEFINE_FREEBSD)
|
||||
struct NoExternTy {
|
||||
uint8_t field;
|
||||
@@ -22,20 +30,12 @@ struct ContainsNoExternTy {
|
||||
};
|
||||
#endif
|
||||
|
||||
struct RenamedTy {
|
||||
uint64_t y;
|
||||
};
|
||||
|
||||
struct Foo {
|
||||
int32_t x;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
|
||||
void renamed_func(RenamedTy a);
|
||||
|
||||
void root(Foo a);
|
||||
|
||||
void renamed_func(RenamedTy a);
|
||||
|
||||
void no_extern_func(ContainsNoExternTy a);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -9,10 +9,10 @@ typedef struct {
|
||||
|
||||
} Foo;
|
||||
|
||||
extern const Bar BAR;
|
||||
extern const int32_t NUMBER;
|
||||
|
||||
extern Foo FOO;
|
||||
|
||||
extern const int32_t NUMBER;
|
||||
extern const Bar BAR;
|
||||
|
||||
void root(void);
|
||||
|
||||
@@ -13,11 +13,11 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern const Bar BAR;
|
||||
extern const int32_t NUMBER;
|
||||
|
||||
extern Foo FOO;
|
||||
|
||||
extern const int32_t NUMBER;
|
||||
extern const Bar BAR;
|
||||
|
||||
void root(void);
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ struct Foo {
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern const Bar BAR;
|
||||
extern const int32_t NUMBER;
|
||||
|
||||
extern Foo FOO;
|
||||
|
||||
extern const int32_t NUMBER;
|
||||
extern const Bar BAR;
|
||||
|
||||
void root();
|
||||
|
||||
|
||||
@@ -7,49 +7,49 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
typedef struct {
|
||||
uint8_t times;
|
||||
} SelfTypeTestStruct;
|
||||
|
||||
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:));
|
||||
typedef struct {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
void PointerToOpaque_sayHello(PointerToOpaque self)
|
||||
/*a comment!*/ CF_SWIFT_NAME(PointerToOpaque.sayHello(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
SelfTypeTestStruct *SelfTypeTestStruct_should_not_exist_return_box(void) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
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:));
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
void free_function_should_not_exist_box(SelfTypeTestStruct *boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
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:));
|
||||
|
||||
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:));
|
||||
|
||||
void PointerToOpaque_sayHello(PointerToOpaque self)
|
||||
/*a comment!*/ CF_SWIFT_NAME(PointerToOpaque.sayHello(self:));
|
||||
|
||||
@@ -7,57 +7,57 @@
|
||||
|
||||
typedef struct Opaque Opaque;
|
||||
|
||||
typedef struct {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
typedef struct {
|
||||
uint8_t times;
|
||||
} SelfTypeTestStruct;
|
||||
|
||||
typedef struct {
|
||||
Opaque *ptr;
|
||||
} PointerToOpaque;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
SelfTypeTestStruct *SelfTypeTestStruct_should_not_exist_return_box(void) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
void free_function_should_not_exist_box(SelfTypeTestStruct *boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
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:));
|
||||
|
||||
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:));
|
||||
|
||||
void PointerToOpaque_sayHello(PointerToOpaque self)
|
||||
/*a comment!*/ CF_SWIFT_NAME(PointerToOpaque.sayHello(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
SelfTypeTestStruct *SelfTypeTestStruct_should_not_exist_return_box(void) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
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:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void free_function_should_not_exist_box(SelfTypeTestStruct *boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void rust_print_hello_world(void) CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -11,53 +11,53 @@ struct Box;
|
||||
|
||||
struct Opaque;
|
||||
|
||||
struct PointerToOpaque {
|
||||
Opaque *ptr;
|
||||
};
|
||||
|
||||
struct SelfTypeTestStruct {
|
||||
uint8_t times;
|
||||
};
|
||||
|
||||
struct PointerToOpaque {
|
||||
Opaque *ptr;
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
|
||||
void rust_print_hello_world() CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(Box<SelfTypeTestStruct> self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
Box<SelfTypeTestStruct> SelfTypeTestStruct_should_not_exist_return_box() CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
void free_function_should_not_exist_box(Box<SelfTypeTestStruct> boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
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:));
|
||||
|
||||
PointerToOpaque PointerToOpaque_create(uint8_t times) CF_SWIFT_NAME(PointerToOpaque.create(times:));
|
||||
|
||||
void PointerToOpaque_sayHello(PointerToOpaque self)
|
||||
/*a comment!*/ CF_SWIFT_NAME(PointerToOpaque.sayHello(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_by_name(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_by_name(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_mut_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_mut_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_annotated_self(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_annotated_self(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_mut_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_mut_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref(const SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_ref_mut(SelfTypeTestStruct *self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_ref_mut(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_exist_unannotated(SelfTypeTestStruct self) CF_SWIFT_NAME(SelfTypeTestStruct.should_exist_unannotated(self:));
|
||||
|
||||
void SelfTypeTestStruct_should_not_exist_box(Box<SelfTypeTestStruct> self) CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_box(self:));
|
||||
|
||||
Box<SelfTypeTestStruct> SelfTypeTestStruct_should_not_exist_return_box() CF_SWIFT_NAME(SelfTypeTestStruct.should_not_exist_return_box());
|
||||
|
||||
void free_function_should_exist_annotated_by_name(SelfTypeTestStruct test_struct) CF_SWIFT_NAME(free_function_should_exist_annotated_by_name(test_struct:));
|
||||
|
||||
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:));
|
||||
|
||||
void free_function_should_exist_ref(const SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref(test_struct:));
|
||||
|
||||
void free_function_should_exist_ref_mut(SelfTypeTestStruct *test_struct) CF_SWIFT_NAME(free_function_should_exist_ref_mut(test_struct:));
|
||||
|
||||
void free_function_should_not_exist_box(Box<SelfTypeTestStruct> boxed) CF_SWIFT_NAME(free_function_should_not_exist_box(boxed:));
|
||||
|
||||
void rust_print_hello_world() CF_SWIFT_NAME(rust_print_hello_world());
|
||||
|
||||
void unnamed_argument(SelfTypeTestStruct*);
|
||||
|
||||
} // extern "C"
|
||||
|
||||
@@ -17,8 +17,8 @@ struct MyStruct {
|
||||
int32_t *number;
|
||||
};
|
||||
|
||||
void root(const Foo *a, const struct MyStruct *with_box);
|
||||
|
||||
void drop_box(int32_t *x);
|
||||
|
||||
void drop_box_opt(int32_t *x);
|
||||
|
||||
void root(const Foo *a, const struct MyStruct *with_box);
|
||||
|
||||
@@ -21,12 +21,12 @@ struct MyStruct {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void root(const Foo *a, const struct MyStruct *with_box);
|
||||
|
||||
void drop_box(int32_t *x);
|
||||
|
||||
void drop_box_opt(int32_t *x);
|
||||
|
||||
void root(const Foo *a, const struct MyStruct *with_box);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,19 +3,28 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CAST (uint8_t)'A'
|
||||
#define FOO 10
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
#define EQUID U'\U00010083'
|
||||
#define QUOTE '\''
|
||||
|
||||
#define FOO 10
|
||||
#define TAB '\t'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
#define HEART U'\U00002764'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
#define EQUID U'\U00010083'
|
||||
|
||||
#define ZOM 3.14
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
/**
|
||||
* A
|
||||
@@ -25,26 +34,17 @@
|
||||
*/
|
||||
#define NEG_ONE -1
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
#define QUOTE '\''
|
||||
|
||||
#define SHIFT 3
|
||||
|
||||
#define TAB '\t'
|
||||
|
||||
#define XBOOL 1
|
||||
|
||||
#define XFALSE ((0 << SHIFT) | XBOOL)
|
||||
|
||||
#define XTRUE (1 << (SHIFT | XBOOL))
|
||||
|
||||
#define ZOM 3.14
|
||||
#define CAST (uint8_t)'A'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
|
||||
struct Foo {
|
||||
int32_t x[FOO];
|
||||
|
||||
@@ -3,19 +3,28 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CAST (uint8_t)'A'
|
||||
#define FOO 10
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
#define EQUID U'\U00010083'
|
||||
#define QUOTE '\''
|
||||
|
||||
#define FOO 10
|
||||
#define TAB '\t'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
#define HEART U'\U00002764'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
#define EQUID U'\U00010083'
|
||||
|
||||
#define ZOM 3.14
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
/**
|
||||
* A
|
||||
@@ -25,26 +34,17 @@
|
||||
*/
|
||||
#define NEG_ONE -1
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
/**
|
||||
* A single-line doc comment.
|
||||
*/
|
||||
#define POS_ONE 1
|
||||
|
||||
#define QUOTE '\''
|
||||
|
||||
#define SHIFT 3
|
||||
|
||||
#define TAB '\t'
|
||||
|
||||
#define XBOOL 1
|
||||
|
||||
#define XFALSE ((0 << SHIFT) | XBOOL)
|
||||
|
||||
#define XTRUE (1 << (SHIFT | XBOOL))
|
||||
|
||||
#define ZOM 3.14
|
||||
#define CAST (uint8_t)'A'
|
||||
|
||||
#define DOUBLE_CAST (uint32_t)(float)1
|
||||
|
||||
struct Foo {
|
||||
int32_t x[FOO];
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
|
||||
#define UNSIGNED_DOESNT_NEED_ULL_SUFFIX 8070450532247928832
|
||||
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
|
||||
#define UNSIGNED_DOESNT_NEED_ULL_SUFFIX 8070450532247928832
|
||||
|
||||
#define UNSIGNED_NEEDS_ULL_SUFFIX 9223372036854775808ULL
|
||||
#define SIGNED_NEEDS_ULL_SUFFIX -9223372036854775808ULL
|
||||
|
||||
#define SIGNED_DOESNT_NEED_ULL_SUFFIX -9223372036854775807
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define CONSTANT_I64 216
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define CONSTANT_I64 216
|
||||
|
||||
#define CONSTANT_FLOAT32 312.292
|
||||
|
||||
#define DELIMITER ':'
|
||||
|
||||
#define LEFTCURLY '{'
|
||||
|
||||
@@ -7,8 +7,8 @@ struct Foo {
|
||||
|
||||
};
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void extra_debug_fn(void);
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void root(struct Foo a);
|
||||
|
||||
@@ -11,10 +11,10 @@ struct Foo {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void extra_debug_fn(void);
|
||||
|
||||
void cbindgen(void);
|
||||
|
||||
void root(struct Foo a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -8,6 +8,6 @@ struct Normal {
|
||||
float y;
|
||||
};
|
||||
|
||||
extern void bar(struct Normal a);
|
||||
|
||||
extern int32_t foo(void);
|
||||
|
||||
extern void bar(struct Normal a);
|
||||
|
||||
@@ -12,10 +12,10 @@ struct Normal {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern void bar(struct Normal a);
|
||||
|
||||
extern int32_t foo(void);
|
||||
|
||||
extern void bar(struct Normal a);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -11,6 +11,6 @@ struct Fns {
|
||||
int8_t (*namedArgsWildcards)(int32_t _, int16_t named, int64_t _1);
|
||||
};
|
||||
|
||||
void no_return(void);
|
||||
|
||||
void root(struct Fns _fns);
|
||||
|
||||
void no_return(void);
|
||||
|
||||
@@ -15,10 +15,10 @@ struct Fns {
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void no_return(void);
|
||||
|
||||
void root(struct Fns _fns);
|
||||
|
||||
void no_return(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
void pointer_test(const uint64_t *a);
|
||||
|
||||
void print_from_rust(void);
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
void pointer_test(const uint64_t *a);
|
||||
|
||||
void print_from_rust(void);
|
||||
|
||||
void unnamed(const uint64_t*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
extern char MUT_GLOBAL_ARRAY[128];
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
extern char MUT_GLOBAL_ARRAY[128];
|
||||
|
||||
extern const char CONST_GLOBAL_ARRAY[128];
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user