-
Notifications
You must be signed in to change notification settings - Fork 290
/
body_tag.compat.c
101 lines (88 loc) · 1.51 KB
/
body_tag.compat.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
enum MyCLikeEnum {
Foo1,
Bar1,
Baz1,
};
enum MyCLikeEnum_Prepended {
Foo1_Prepended,
Bar1_Prepended,
Baz1_Prepended,
};
struct MyFancyStruct {
int32_t i;
#ifdef __cplusplus
inline void foo();
#endif
};
enum MyFancyEnum_Tag {
Foo,
Bar,
Baz,
};
struct MyFancyEnum {
enum MyFancyEnum_Tag tag;
union {
struct {
int32_t bar;
};
struct {
int32_t baz;
};
};
#ifdef __cplusplus
inline void wohoo();
#endif
};
union MyUnion {
float f;
uint32_t u;
int32_t extra_member;
};
struct MyFancyStruct_Prepended {
#ifdef __cplusplus
inline void prepended_wohoo();
#endif
int32_t i;
};
enum MyFancyEnum_Prepended_Tag {
Foo_Prepended,
Bar_Prepended,
Baz_Prepended,
};
struct MyFancyEnum_Prepended {
#ifdef __cplusplus
inline void wohoo();
#endif
enum MyFancyEnum_Prepended_Tag tag;
union {
struct {
int32_t bar_prepended;
};
struct {
int32_t baz_prepended;
};
};
};
union MyUnion_Prepended {
int32_t extra_member;
float f;
uint32_t u;
};
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
void root(struct MyFancyStruct s,
struct MyFancyEnum e,
enum MyCLikeEnum c,
union MyUnion u,
struct MyFancyStruct_Prepended sp,
struct MyFancyEnum_Prepended ep,
enum MyCLikeEnum_Prepended cp,
union MyUnion_Prepended up);
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus