bitwarden_c/macros/
ffi.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Get a reference to an object from a pointer
#[macro_export]
macro_rules! ffi_ref {
    ($name:ident) => {{
        assert!(!$name.is_null());
        &*$name
    }};
}

// Returns a raw pointer from an object
#[macro_export]
macro_rules! box_ptr {
    ($x:expr) => {
        Box::into_raw(Box::new($x))
    };
}