(jni_env: *mut JNIEnv, str: &str)
| 508 | } |
| 509 | |
| 510 | unsafe fn new_string(jni_env: *mut JNIEnv, str: &str) -> Result<jstring, String> { |
| 511 | let cstr = CString::new(str).unwrap(); |
| 512 | return util::result_or_jni_ex((**jni_env).NewStringUTF.unwrap()(jni_env, cstr.as_ptr()), jni_env); |
| 513 | } |
| 514 | |
| 515 | unsafe fn get_this(thread: jthread, depth: jint) -> Result<jobject, String> { |
| 516 | let mut obj: jobject = ptr::null_mut(); |
no test coverage detected