Skip to content

Commit

Permalink
add missing JNI_VERSION_9, JNI_VERSION_10 constant for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
dawndiy authored Dec 12, 2023
1 parent 7a2c40e commit 551349e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ package jnigi
#include<jni.h>
#include<stdlib.h>
// Android is missing the JNI_VERSION_1_8 constant
// Android is missing the JNI_VERSION_1_8, JNI_VERSION_9, JNI_VERSION_10 constant
#ifndef JNI_VERSION_1_8
#define JNI_VERSION_1_8 0x00010008
#endif
#ifndef JNI_VERSION_9
#define JNI_VERSION_9 0x00090000
#endif
#ifndef JNI_VERSION_10
#define JNI_VERSION_10 0x000a0000
#endif
jclass FindClass(JNIEnv* env, char* name) {
return (*env)->FindClass (env, name);
Expand Down

0 comments on commit 551349e

Please sign in to comment.