Skip to content

Commit f3dd06a

Browse files
committed
Follow unsafe api changes in j4rs
1 parent d0194ef commit f3dd06a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/j4rs_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "j4rs_derive"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = ["aston <[email protected]>"]
55
description = "The proc macro crate for `j4rs` that allows jni calls to Rust libraries."
66
keywords = ["java", "jni"]

rust/j4rs_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn impl_call_from_java_macro(user_function: &ItemFn, macro_args: AttributeArgs)
115115
let gen = quote! {
116116
#[no_mangle]
117117
pub fn #jni_ident(jni_env: *mut JNIEnv, _class: *const c_void, #(#jni_function_args),*) #jni_function_output {
118-
match Jvm::try_from(jni_env) {
118+
match unsafe {Jvm::try_from(jni_env)} {
119119
Ok(mut jvm) => {
120120
jvm.detach_thread_on_drop(false);
121121
// println!("Called {}. Calling now {}", stringify!(#jni_ident), stringify!(#user_function_name));

0 commit comments

Comments
 (0)