Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/body.pyx

raw
1 from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
2 from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
3 cdef extern from *:
4 ctypedef bint bool
5 ctypedef struct va_list
6
7 cdef extern from *:
8
9 ctypedef enum MyCLikeEnum:
10 Foo1,
11 Bar1,
12 Baz1,
13
14 ctypedef enum MyCLikeEnum_Prepended:
15 Foo1_Prepended,
16 Bar1_Prepended,
17 Baz1_Prepended,
18
19 ctypedef struct MyFancyStruct:
20 int32_t i;
21 #ifdef __cplusplus
22 inline void foo();
23 #endif
24
25 ctypedef enum MyFancyEnum_Tag:
26 Foo,
27 Bar,
28 Baz,
29
30 ctypedef struct MyFancyEnum:
31 MyFancyEnum_Tag tag;
32 int32_t bar;
33 int32_t baz;
34 #ifdef __cplusplus
35 inline void wohoo();
36 #endif
37
38 ctypedef union MyUnion:
39 float f;
40 uint32_t u;
41 int32_t extra_member;
42
43 ctypedef struct MyFancyStruct_Prepended:
44 #ifdef __cplusplus
45 inline void prepended_wohoo();
46 #endif
47 int32_t i;
48
49 ctypedef enum MyFancyEnum_Prepended_Tag:
50 Foo_Prepended,
51 Bar_Prepended,
52 Baz_Prepended,
53
54 ctypedef struct MyFancyEnum_Prepended:
55 #ifdef __cplusplus
56 inline void wohoo();
57 #endif
58 MyFancyEnum_Prepended_Tag tag;
59 int32_t bar_prepended;
60 int32_t baz_prepended;
61
62 ctypedef union MyUnion_Prepended:
63 int32_t extra_member;
64 float f;
65 uint32_t u;
66
67 void root(MyFancyStruct s,
68 MyFancyEnum e,
69 MyCLikeEnum c,
70 MyUnion u,
71 MyFancyStruct_Prepended sp,
72 MyFancyEnum_Prepended ep,
73 MyCLikeEnum_Prepended cp,
74 MyUnion_Prepended up);