File tree Expand file tree Collapse file tree 9 files changed +141
-0
lines changed Expand file tree Collapse file tree 9 files changed +141
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <stdarg.h>
2+ #include <stdbool.h>
3+ #include <stdint.h>
4+ #include <stdlib.h>
5+
6+ typedef struct NotReprC_RefCell_i32 NotReprC_RefCell_i32 ;
7+
8+ typedef NotReprC_RefCell_i32 Foo ;
9+
10+ typedef struct MyStruct {
11+ int32_t number ;
12+ } MyStruct ;
13+
14+ void root (const Foo * a , const MyStruct * with_cell );
Original file line number Diff line number Diff line change 1+ #include <stdarg.h>
2+ #include <stdbool.h>
3+ #include <stdint.h>
4+ #include <stdlib.h>
5+
6+ typedef struct NotReprC_RefCell_i32 NotReprC_RefCell_i32 ;
7+
8+ typedef NotReprC_RefCell_i32 Foo ;
9+
10+ typedef struct MyStruct {
11+ int32_t number ;
12+ } MyStruct ;
13+
14+ #ifdef __cplusplus
15+ extern "C" {
16+ #endif // __cplusplus
17+
18+ void root (const Foo * a , const MyStruct * with_cell );
19+
20+ #ifdef __cplusplus
21+ } // extern "C"
22+ #endif // __cplusplus
Original file line number Diff line number Diff line change 1+ #include <stdarg.h>
2+ #include <stdbool.h>
3+ #include <stdint.h>
4+ #include <stdlib.h>
5+
6+ typedef struct NotReprC_RefCell_i32 NotReprC_RefCell_i32 ;
7+
8+ typedef NotReprC_RefCell_i32 Foo ;
9+
10+ typedef struct {
11+ int32_t number ;
12+ } MyStruct ;
13+
14+ void root (const Foo * a , const MyStruct * with_cell );
Original file line number Diff line number Diff line change 1+ #include <stdarg.h>
2+ #include <stdbool.h>
3+ #include <stdint.h>
4+ #include <stdlib.h>
5+
6+ typedef struct NotReprC_RefCell_i32 NotReprC_RefCell_i32 ;
7+
8+ typedef NotReprC_RefCell_i32 Foo ;
9+
10+ typedef struct {
11+ int32_t number ;
12+ } MyStruct ;
13+
14+ #ifdef __cplusplus
15+ extern "C" {
16+ #endif // __cplusplus
17+
18+ void root (const Foo * a , const MyStruct * with_cell );
19+
20+ #ifdef __cplusplus
21+ } // extern "C"
22+ #endif // __cplusplus
Original file line number Diff line number Diff line change 1+ #include < cstdarg>
2+ #include < cstdint>
3+ #include < cstdlib>
4+ #include < new>
5+
6+ template <typename T>
7+ struct NotReprC ;
8+
9+ template <typename T>
10+ struct RefCell ;
11+
12+ using Foo = NotReprC<RefCell<int32_t >>;
13+
14+ struct MyStruct {
15+ int32_t number;
16+ };
17+
18+ extern " C" {
19+
20+ void root (const Foo *a, const MyStruct *with_cell);
21+
22+ } // extern "C"
Original file line number Diff line number Diff line change 1+ #include <stdarg.h>
2+ #include <stdbool.h>
3+ #include <stdint.h>
4+ #include <stdlib.h>
5+
6+ struct NotReprC_RefCell_i32 ;
7+
8+ typedef struct NotReprC_RefCell_i32 Foo ;
9+
10+ struct MyStruct {
11+ int32_t number ;
12+ };
13+
14+ void root (const Foo * a , const struct MyStruct * with_cell );
Original file line number Diff line number Diff line change 1+ #include <stdarg.h>
2+ #include <stdbool.h>
3+ #include <stdint.h>
4+ #include <stdlib.h>
5+
6+ struct NotReprC_RefCell_i32 ;
7+
8+ typedef struct NotReprC_RefCell_i32 Foo ;
9+
10+ struct MyStruct {
11+ int32_t number ;
12+ };
13+
14+ #ifdef __cplusplus
15+ extern "C" {
16+ #endif // __cplusplus
17+
18+ void root (const Foo * a , const struct MyStruct * with_cell );
19+
20+ #ifdef __cplusplus
21+ } // extern "C"
22+ #endif // __cplusplus
Original file line number Diff line number Diff line change 1+ #[ repr( C ) ]
2+ pub struct MyStruct {
3+ number : std:: cell:: Cell < i32 > ,
4+ }
5+
6+ pub struct NotReprC < T > { inner : T }
7+
8+ pub type Foo = NotReprC < std:: cell:: RefCell < i32 > > ;
9+
10+ #[ no_mangle]
11+ pub extern "C" fn root ( a : & Foo , with_cell : & MyStruct ) { }
You can’t perform that action at this time.
0 commit comments