From 14340b5f87db9fa5c8ad6506d8cdd2a015b046c4 Mon Sep 17 00:00:00 2001 From: player-03 Date: Sun, 20 Nov 2022 11:51:56 -0500 Subject: [PATCH] Fix error when using JNI in macro context. --- src/lime/system/JNI.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lime/system/JNI.hx b/src/lime/system/JNI.hx index fea483491..7fb42ac03 100644 --- a/src/lime/system/JNI.hx +++ b/src/lime/system/JNI.hx @@ -103,7 +103,7 @@ class JNI #if (android && lime_cffi && !macro) return new JNIMemberField(NativeCFFI.lime_jni_create_field(className, memberName, signature, false)); #else - return null; + return new JNIMemberField(null); #end } @@ -139,7 +139,7 @@ class JNI #if (android && lime_cffi && !macro) return new JNIStaticField(NativeCFFI.lime_jni_create_field(className, memberName, signature, true)); #else - return null; + return new JNIStaticField(null); #end } @@ -185,7 +185,7 @@ class JNI { initialized = true; - #if android + #if (android && !macro) var method = System.load("lime", "lime_jni_init_callback", 1); method(onCallback); #end