Skip to content

Commit

Permalink
Compute JNI function signatures correctly for object arguments.
Browse files Browse the repository at this point in the history
Related to #76.
  • Loading branch information
Monnoroch committed Jul 27, 2018
1 parent 5ba2f94 commit 37c23f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ impl JavaName {
} else if is_identifier(&token, "double") {
<f64 as rust_jni::JavaType>::__signature().to_owned()
} else {
"".to_string()
format!("L{}_2", self.clone().with_underscores())
}
} else {
"".to_string()
format!("L{}_2", self.clone().with_underscores())
}
}

Expand Down Expand Up @@ -4532,7 +4532,7 @@ mod java_generate_tests {

#[no_mangle]
#[doc(hidden)]
pub unsafe extern "C" fn Java_a_b_TestClass3_objectNativeFunc3__<'a>(
pub unsafe extern "C" fn Java_a_b_TestClass3_objectNativeFunc3__La_b_TestClass3_2<'a>(
raw_env: *mut ::jni_sys::JNIEnv,
object: ::jni_sys::jobject,
arg: <::a::b::TestClass3 as ::rust_jni::JavaType>::__JniType,
Expand Down Expand Up @@ -4610,7 +4610,7 @@ mod java_generate_tests {

#[no_mangle]
#[doc(hidden)]
pub unsafe extern "C" fn Java_a_b_TestClass3_objectStaticNativeFunc3__<'a>(
pub unsafe extern "C" fn Java_a_b_TestClass3_objectStaticNativeFunc3__La_b_TestClass3_2<'a>(
raw_env: *mut ::jni_sys::JNIEnv,
raw_class: ::jni_sys::jclass,
arg: <::a::b::TestClass3 as ::rust_jni::JavaType>::__JniType,
Expand Down

0 comments on commit 37c23f7

Please sign in to comment.