Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/nonnull_attribute.compat.c

raw
1 #ifdef __clang__
2 #define CBINDGEN_NONNULL _Nonnull
3 #else
4 #define CBINDGEN_NONNULL
5 #endif
6
7
8 #include <stdarg.h>
9 #include <stdbool.h>
10 #include <stdint.h>
11 #include <stdlib.h>
12
13 typedef struct Opaque Opaque;
14
15 typedef struct {
16 const Opaque *CBINDGEN_NONNULL a;
17 Opaque *CBINDGEN_NONNULL b;
18 const Opaque *c;
19 Opaque *d;
20 } References;
21
22 typedef struct {
23 float *CBINDGEN_NONNULL a;
24 uint64_t *CBINDGEN_NONNULL b;
25 Opaque *CBINDGEN_NONNULL c;
26 uint64_t *CBINDGEN_NONNULL *CBINDGEN_NONNULL d;
27 float *CBINDGEN_NONNULL *CBINDGEN_NONNULL e;
28 Opaque *CBINDGEN_NONNULL *CBINDGEN_NONNULL f;
29 uint64_t *g;
30 int32_t *h;
31 int32_t *CBINDGEN_NONNULL *i;
32 const uint64_t *j;
33 uint64_t *k;
34 } Pointers_u64;
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif // __cplusplus
39
40 void value_arg(References arg);
41
42 void mutltiple_args(int32_t *CBINDGEN_NONNULL arg,
43 Pointers_u64 *foo,
44 Opaque *CBINDGEN_NONNULL *CBINDGEN_NONNULL d);
45
46 void ref_arg(const Pointers_u64 *CBINDGEN_NONNULL arg);
47
48 void mut_ref_arg(Pointers_u64 *CBINDGEN_NONNULL arg);
49
50 void optional_ref_arg(const Pointers_u64 *arg);
51
52 void optional_mut_ref_arg(Pointers_u64 *arg);
53
54 void nullable_const_ptr(const Pointers_u64 *arg);
55
56 void nullable_mut_ptr(Pointers_u64 *arg);
57
58 #ifdef __cplusplus
59 } // extern "C"
60 #endif // __cplusplus