mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-26 17:03:43 +02:00
move extern "C"
only JNI functions need to be exported
This commit is contained in:
parent
951dc75d97
commit
e20dfeaa82
3 changed files with 4 additions and 20 deletions
|
@ -30,10 +30,6 @@
|
||||||
|
|
||||||
extern JniLookup lookup;
|
extern JniLookup lookup;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
jobject createResultObject(JNIEnv *env, ZT_ResultCode code)
|
jobject createResultObject(JNIEnv *env, ZT_ResultCode code)
|
||||||
{
|
{
|
||||||
jclass resultClass = NULL;
|
jclass resultClass = NULL;
|
||||||
|
@ -1028,7 +1024,3 @@ jobject newVirtualNetworkDNS(JNIEnv *env, const ZT_VirtualNetworkDNS &dns)
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -22,10 +22,6 @@
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <ZeroTierOne.h>
|
#include <ZeroTierOne.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LOG_TAG "ZeroTierOneJNI"
|
#define LOG_TAG "ZeroTierOneJNI"
|
||||||
|
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
|
@ -78,8 +74,4 @@ jobject newVirtualNetworkRoute(JNIEnv *env, const ZT_VirtualNetworkRoute &route)
|
||||||
|
|
||||||
jobject newVirtualNetworkDNS(JNIEnv *env, const ZT_VirtualNetworkDNS &dns);
|
jobject newVirtualNetworkDNS(JNIEnv *env, const ZT_VirtualNetworkDNS &dns);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
|
@ -40,10 +40,6 @@
|
||||||
// global static JNI Lookup Object
|
// global static JNI Lookup Object
|
||||||
JniLookup lookup;
|
JniLookup lookup;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct JniRef
|
struct JniRef
|
||||||
{
|
{
|
||||||
|
@ -732,6 +728,10 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
|
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
|
||||||
{
|
{
|
||||||
lookup.setJavaVM(vm);
|
lookup.setJavaVM(vm);
|
||||||
|
|
Loading…
Add table
Reference in a new issue