|
|
|
@ -24,12 +24,12 @@ JNIEXPORT jlong JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_open |
|
|
|
|
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPackageName |
|
|
|
|
(JNIEnv* env, jobject, jlong handle) |
|
|
|
|
{ |
|
|
|
|
const char* (*info_func)(); |
|
|
|
|
InfoFunctionType info_func; |
|
|
|
|
const char* result; |
|
|
|
|
const char* error; |
|
|
|
|
|
|
|
|
|
dlerror(); |
|
|
|
|
*(void **) (&info_func) = dlsym((void*)handle, "GetPackageName"); |
|
|
|
|
info_func = (InfoFunctionType)dlsym((void*)handle, "GetPackageName"); |
|
|
|
|
if ((error = dlerror()) == NULL) |
|
|
|
|
result = (*info_func)(); |
|
|
|
|
else |
|
|
|
@ -44,12 +44,12 @@ JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getPackageNam |
|
|
|
|
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getLibraryList |
|
|
|
|
(JNIEnv* env, jobject, jlong handle) |
|
|
|
|
{ |
|
|
|
|
const char* (*info_func)(); |
|
|
|
|
InfoFunctionType info_func; |
|
|
|
|
const char* result; |
|
|
|
|
const char* error; |
|
|
|
|
|
|
|
|
|
dlerror(); |
|
|
|
|
*(void **) (&info_func) = dlsym((void*)handle, "GetLibraryList"); |
|
|
|
|
info_func = (InfoFunctionType)dlsym((void*)handle, "GetLibraryList"); |
|
|
|
|
if ((error = dlerror()) == NULL) |
|
|
|
|
result = (*info_func)(); |
|
|
|
|
else |
|
|
|
@ -64,12 +64,12 @@ JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getLibraryLis |
|
|
|
|
JNIEXPORT jstring JNICALL Java_org_opencv_engine_OpenCVLibraryInfo_getVersionName |
|
|
|
|
(JNIEnv* env, jobject, jlong handle) |
|
|
|
|
{ |
|
|
|
|
const char* (*info_func)(); |
|
|
|
|
InfoFunctionType info_func; |
|
|
|
|
const char* result; |
|
|
|
|
const char* error; |
|
|
|
|
|
|
|
|
|
dlerror(); |
|
|
|
|
*(void **) (&info_func) = dlsym((void*)handle, "GetRevision"); |
|
|
|
|
info_func = (InfoFunctionType)dlsym((void*)handle, "GetRevision"); |
|
|
|
|
if ((error = dlerror()) == NULL) |
|
|
|
|
result = (*info_func)(); |
|
|
|
|
else |
|
|
|
|