Debian Codegraph @

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

raw
1 #ifdef __clang__
2 #define CBINDGEN_NONNULL _Nonnull
3 #else
4 #define CBINDGEN_NONNULL
5 #endif
6
7
8 from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
9 from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
10 cdef extern from *:
11 ctypedef bint bool
12 ctypedef struct va_list
13
14 cdef extern from *:
15
16 ctypedef struct Opaque:
17 pass
18
19 ctypedef struct References:
20 const Opaque *a;
21 Opaque *b;
22 const Opaque *c;
23 Opaque *d;
24
25 ctypedef struct Pointers_u64:
26 float *a;
27 uint64_t *b;
28 Opaque *c;
29 uint64_t **d;
30 float **e;
31 Opaque **f;
32 uint64_t *g;
33 int32_t *h;
34 int32_t **i;
35 const uint64_t *j;
36 uint64_t *k;
37
38 void value_arg(References arg);
39
40 void mutltiple_args(int32_t *arg, Pointers_u64 *foo, Opaque **d);
41
42 void ref_arg(const Pointers_u64 *arg);
43
44 void mut_ref_arg(Pointers_u64 *arg);
45
46 void optional_ref_arg(const Pointers_u64 *arg);
47
48 void optional_mut_ref_arg(Pointers_u64 *arg);
49
50 void nullable_const_ptr(const Pointers_u64 *arg);
51
52 void nullable_mut_ptr(Pointers_u64 *arg);