Skip to content

Commit

Permalink
feat: allow passing JObject and JObjectArray directly
Browse files Browse the repository at this point in the history
  • Loading branch information
zaaarf committed Sep 22, 2024
1 parent 66e8100 commit d6e079e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use jni::objects::JObject;
use jni::{objects::{JObject, JObjectArray, JString}, sys::{jboolean, jobject}};
pub use jni_toolbox_macro::jni;

pub trait JniToolboxError: std::error::Error {
Expand Down Expand Up @@ -44,6 +44,8 @@ auto_from_java!(i32, jni::sys::jint);
auto_from_java!(i16, jni::sys::jshort);
auto_from_java!(f32, jni::sys::jfloat);
auto_from_java!(f64, jni::sys::jdouble);
auto_from_java!(JObject<'j>, JObject<'j>);
auto_from_java!(JObjectArray<'j>, JObjectArray<'j>);

impl<'j> FromJava<'j> for bool {
type T = jni::sys::jboolean;
Expand Down

0 comments on commit d6e079e

Please sign in to comment.