Skip to content

Commit

Permalink
Fix native library loading
Browse files Browse the repository at this point in the history
  • Loading branch information
xxDark committed Jul 26, 2022
1 parent aae0f17 commit dbb8ddc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'dev.xdark'
version '1.9.0.1'
version '1.9.0.2'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void init(VirtualMachine vm) {
}
return false;
}
InstanceValue _this = locals.<InstanceValue>load(0);
InstanceValue _this = locals.load(0);
_this.setLong("handle", handle);
_this.setInt("jniVersion", result.getJniVersion());
return true;
Expand All @@ -58,7 +58,7 @@ public void init(VirtualMachine vm) {
InstanceJavaClass librariesClass = (InstanceJavaClass) vm.findBootstrapClass("jdk/internal/loader/NativeLibraries");
findEntryClass = librariesClass;
findBuiltinLibClass = librariesClass;
vmi.setInvoker(librariesClass, "load", "(Ljdk/internal/loader/NativeLibraries$NativeLibraryImpl;Ljava/lang/String;Z)", ctx -> {
vmi.setInvoker(librariesClass, "load", "(Ljdk/internal/loader/NativeLibraries$NativeLibraryImpl;Ljava/lang/String;Z)Z", ctx -> {
ctx.setResult(load.test(ctx) ? IntValue.ONE : IntValue.ZERO);
return Result.ABORT;
});
Expand All @@ -73,7 +73,7 @@ public void init(VirtualMachine vm) {
});
} else {
if (!vmi.setInvoker(libraryClass, "load", "(Ljava/lang/String;Z)V", ctx -> {
InstanceValue _this = ctx.getLocals().<InstanceValue>load(0);
InstanceValue _this = ctx.getLocals().load(0);
_this.setBoolean("loaded", load.test(ctx));
return Result.ABORT;
})) {
Expand Down

0 comments on commit dbb8ddc

Please sign in to comment.