Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/constant.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 const int32_t FOO # = 10
10
11 const uint32_t DELIMITER # = ':'
12
13 const uint32_t LEFTCURLY # = '{'
14
15 const uint32_t QUOTE # = '\''
16
17 const uint32_t TAB # = '\t'
18
19 const uint32_t NEWLINE # = '\n'
20
21 const uint32_t HEART # = U'\U00002764'
22
23 const uint32_t EQUID # = U'\U00010083'
24
25 const float ZOM # = 3.14
26
27 # A single-line doc comment.
28 const int8_t POS_ONE # = 1
29
30 # A
31 # multi-line
32 # doc
33 # comment.
34 const int8_t NEG_ONE # = -1
35
36 const int64_t SHIFT # = 3
37
38 const int64_t XBOOL # = 1
39
40 const int64_t XFALSE # = ((0 << SHIFT) | XBOOL)
41
42 const int64_t XTRUE # = (1 << (SHIFT | XBOOL))
43
44 const uint8_t CAST # = <uint8_t>'A'
45
46 const uint32_t DOUBLE_CAST # = <uint32_t><float>1
47
48 ctypedef struct Foo:
49 int32_t x[FOO];
50
51 void root(Foo x);