| 1 |
header = """ |
| 2 |
#if 0 |
| 3 |
''' ' |
| 4 |
#endif |
| 5 |
|
| 6 |
#ifdef __cplusplus |
| 7 |
template <typename T> |
| 8 |
using Box = T*; |
| 9 |
#endif |
| 10 |
|
| 11 |
#if 0 |
| 12 |
' ''' |
| 13 |
#endif |
| 14 |
""" |
| 15 |
|
| 16 |
trailer = """ |
| 17 |
#if 0 |
| 18 |
''' ' |
| 19 |
#endif |
| 20 |
|
| 21 |
#include <stddef.h> |
| 22 |
#include "testing-helpers.h" |
| 23 |
static_assert(offsetof(CBINDGEN_STRUCT(P), tag) == 0, "unexpected offset for tag"); |
| 24 |
static_assert(offsetof(CBINDGEN_STRUCT(P), p0) == 1, "unexpected offset for p0"); |
| 25 |
static_assert(offsetof(CBINDGEN_STRUCT(P), p0) == 1, "unexpected offset for p1"); |
| 26 |
static_assert(sizeof(CBINDGEN_STRUCT(P)) == 4, "unexpected size for P"); |
| 27 |
|
| 28 |
#if 0 |
| 29 |
' ''' |
| 30 |
#endif |
| 31 |
""" |
| 32 |
|
| 33 |
[export] |
| 34 |
exclude = [ |
| 35 |
"Box", |
| 36 |
] |
| 37 |
|
| 38 |
[export.rename] |
| 39 |
"I" = "ExI" |