Skip to content

Commit

Permalink
Merge pull request #90 from rukai/fix_compilation_of_no-runtime-liblo…
Browse files Browse the repository at this point in the history
…ading

Fix compilation of no-runtime-libloading
  • Loading branch information
astonbitecode authored Mar 1, 2024
2 parents d361dd0 + 66182da commit cfbcecc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rust/src/api_tweaks/no_runtime_lib_loading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use std::os::raw::c_void;

use jni_sys::{jclass, jint, jsize, JNIEnv, JNI_CreateJavaVM, JNI_GetCreatedJavaVMs, JavaVM};

use crate::errors::opt_to_res;
use crate::{errors, utils};

#[link(name = "jvm")]
Expand All @@ -40,7 +39,7 @@ pub(crate) fn create_java_vm(
pub(crate) fn find_class(env: *mut JNIEnv, classname: &str) -> errors::Result<jclass> {
unsafe {
let cstr = utils::to_c_string(classname);
let fc = opt_to_res((**env).FindClass)?;
let fc = (**env).v1_6.FindClass;
let jc = (fc)(env, cstr);
utils::drop_c_string(cstr);
Ok(jc)
Expand Down

0 comments on commit cfbcecc

Please sign in to comment.