Debian Codegraph @

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

raw
1 #if 0
2 DEF PLATFORM_UNIX = 0
3 DEF PLATFORM_WIN = 0
4 DEF X11 = 0
5 DEF M_32 = 0
6 #endif
7
8
9 from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
10 from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
11 cdef extern from *:
12 ctypedef bint bool
13 ctypedef struct va_list
14
15 cdef extern from *:
16
17 IF (PLATFORM_WIN or M_32):
18 cdef enum:
19 A,
20 B,
21 C,
22 ctypedef uint32_t BarType;
23
24 IF (PLATFORM_UNIX and X11):
25 cdef enum:
26 A,
27 B,
28 C,
29 ctypedef uint32_t FooType;
30
31 IF (PLATFORM_UNIX and X11):
32 ctypedef struct FooHandle:
33 FooType ty;
34 int32_t x;
35 float y;
36
37 cdef enum:
38 C1,
39 C2,
40 C3,
41 C5,
42 ctypedef uint8_t C_Tag;
43
44 ctypedef struct C5_Body:
45 C_Tag tag;
46 int32_t int_;
47
48 ctypedef union C:
49 C_Tag tag;
50 C5_Body c5;
51
52 IF (PLATFORM_WIN or M_32):
53 ctypedef struct BarHandle:
54 BarType ty;
55 int32_t x;
56 float y;
57
58 ctypedef struct ConditionalField:
59 int32_t field;
60
61 IF (PLATFORM_UNIX and X11):
62 void root(FooHandle a, C c);
63
64 IF (PLATFORM_WIN or M_32):
65 void root(BarHandle a, C c);
66
67 void cond(ConditionalField a);