File: reserved.rs

package info (click to toggle)
rust-cbindgen 0.24.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,532 kB
  • sloc: ansic: 15; makefile: 11
file content (37 lines) | stat: -rw-r--r-- 451 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#[repr(C)]
struct A {
    namespace: i32,
    float: f32,
}

/// cbindgen:field-names=[namespace, float]
#[repr(C)]
struct B(i32, f32);

#[repr(C, u8)]
enum C {
    D { namespace: i32, float: f32 },
}

#[repr(C, u8)]
enum E {
    Double(f64),
    Float(f32),
}

#[repr(C, u8)]
enum F {
    double(f64),
    float(f32),
}

#[no_mangle]
pub extern "C" fn root(
    a: A,
    b: B,
    c: C,
    e: E,
    f: F,
    namespace: i32,
    float: f32,
) { }