#[unsafe(no_mangle)]
pub unsafe extern "system" fn {{ symbol }}(
    mut env: EnvUnowned,
    _class: JClass,
    name: JString,
) {
    // SAFETY: env is a valid EnvUnowned passed by the JVM for this native call frame.
    let mut __jni_attach_guard = unsafe { jni::AttachGuard::from_unowned(env.as_raw()) };
    let env = __jni_attach_guard.borrow_env_mut();
    let name = match jstring_to_string(env, name) {
        Ok(s) => s,
        Err(e) => { throw_jni_error(env, &format!("{e}")); return; }
    };
    let Some(result) = run_or_throw(env, std::panic::AssertUnwindSafe(|| core_crate::{{ unregister_fn }}(&name))) else {
        return;
    };
    if let Err(e) = result {
        throw_jni_error(env, &format!("{e}"));
    }
}
