Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/android-openjdk-build-multiarch
Path: blob/buildjre8/ios-missing-include/JavaNativeFoundation/JavaNativeFoundation.h
861 views
1
#include <objc/runtime.h>
2
#include <objc/message.h>
3
4
#include <jni.h>
5
6
#define JNF_COCOA_ENTER(env)
7
#define JNF_COCOA_EXIT(env)
8
9
static inline NSString* JNFJavaToNSString(JNIEnv* env, jstring str) {
10
NSString *result = NULL;
11
const char *str_cstr = (*env)->GetStringUTFChars(env, str, 0);
12
if ((*env)->ExceptionOccurred(env)) { return 0; }
13
14
if (str_cstr != NULL) {
15
result = @(str_cstr);
16
(*env)->ReleaseStringUTFChars(env, str, str_cstr);
17
}
18
19
return result;
20
}
21
22