(jni_env_opt: Option<*mut JNIEnv>)
| 382 | } |
| 383 | |
| 384 | pub(crate) fn set_thread_local_env(jni_env_opt: Option<*mut JNIEnv>) { |
| 385 | debug("Called set_thread_local_env"); |
| 386 | JNI_ENV.with(|existing_jni_env_opt| { |
| 387 | *existing_jni_env_opt.borrow_mut() = jni_env_opt; |
| 388 | }); |
| 389 | } |
| 390 | |
| 391 | pub(crate) fn get_thread_local_env() -> errors::Result<*mut JNIEnv> { |
| 392 | match get_thread_local_env_opt() { |