Debian Codegraph @

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

raw
1 #define CBINDGEN_PACKED __attribute__ ((packed))
2 #define CBINDGEN_ALIGNED(n) __attribute__ ((aligned(n)))
3
4
5 from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
6 from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
7 cdef extern from *:
8 ctypedef bint bool
9 ctypedef struct va_list
10
11 cdef extern from *:
12
13 ctypedef struct OpaquePackedStruct:
14 pass
15
16 ctypedef struct OpaquePackedUnion:
17 pass
18
19 ctypedef union Align1Union:
20 uintptr_t variant1;
21 uint8_t *variant2;
22
23 ctypedef union Align4Union:
24 uintptr_t variant1;
25 uint8_t *variant2;
26
27 ctypedef union Align16Union:
28 uintptr_t variant1;
29 uint8_t *variant2;
30
31 ctypedef struct Align1Struct:
32 uintptr_t arg1;
33 uint8_t *arg2;
34
35 ctypedef struct Align2Struct:
36 uintptr_t arg1;
37 uint8_t *arg2;
38
39 ctypedef struct Align4Struct:
40 uintptr_t arg1;
41 uint8_t *arg2;
42
43 ctypedef struct Align8Struct:
44 uintptr_t arg1;
45 uint8_t *arg2;
46
47 ctypedef struct Align32Struct:
48 uintptr_t arg1;
49 uint8_t *arg2;