alef 0.62.2

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{% if source_cfg -%}
#[cfg({{ source_cfg }})]
{% endif -%}
/// Free a `{{ enum_name }}` handle.
/// # Safety
/// Handle must have been returned by this library, or be zero.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn {{ prefix }}_{{ enum_snake }}_free(handle: AlefHandle) {
    catch_ffi_panic((), || {
    if handle != 0 {
        if let Err(error) = remove_handle::<{{ qualified }}>(handle) {
            set_handle_error(&error);
        }
    }
    })
}