alef 0.85.21

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
    if {{ name }} == 0 {
        throw_jni_error(env, "native handle `{{ name }}` must not be zero");
        return {{ ret_null }};
    }
    // SAFETY: {{ name }} was allocated by the matching constructor shim and
    // remains valid until the destructor shim is called.
    let {{ name }}: &{{ type_path }} = unsafe { &*({{ name }} as *const {{ type_path }}) };