2022-03-31 22:05:21 +02:00
|
|
|
header = """
|
|
|
|
#if 0
|
|
|
|
''' '
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
template <typename T>
|
|
|
|
using Box = T*;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
' '''
|
|
|
|
#endif
|
|
|
|
"""
|
|
|
|
|
2020-01-25 18:24:41 -08:00
|
|
|
trailer = """
|
2020-11-18 16:50:59 +03:00
|
|
|
#if 0
|
|
|
|
''' '
|
|
|
|
#endif
|
|
|
|
|
2020-01-25 18:24:41 -08:00
|
|
|
#include <stddef.h>
|
|
|
|
#include "testing-helpers.h"
|
|
|
|
static_assert(offsetof(CBINDGEN_STRUCT(P), tag) == 0, "unexpected offset for tag");
|
|
|
|
static_assert(offsetof(CBINDGEN_STRUCT(P), p0) == 1, "unexpected offset for p0");
|
|
|
|
static_assert(offsetof(CBINDGEN_STRUCT(P), p0) == 1, "unexpected offset for p1");
|
|
|
|
static_assert(sizeof(CBINDGEN_STRUCT(P)) == 4, "unexpected size for P");
|
2020-11-18 16:50:59 +03:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
' '''
|
|
|
|
#endif
|
|
|
|
"""
|
2021-03-23 12:30:19 +04:00
|
|
|
|
2022-03-31 22:05:21 +02:00
|
|
|
[export]
|
|
|
|
exclude = [
|
|
|
|
"Box",
|
|
|
|
]
|
|
|
|
|
2021-03-23 12:30:19 +04:00
|
|
|
[export.rename]
|
|
|
|
"I" = "ExI"
|