From 779f4e39de360ab385a8b61d13b7698d9e2db328 Mon Sep 17 00:00:00 2001 From: Andrey Pavlenko Date: Wed, 20 Jun 2012 08:58:30 +0000 Subject: [PATCH] adding JNI func-s declarations to eliminate build warnings inside Android tree --- modules/java/gen_java.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/java/gen_java.py b/modules/java/gen_java.py index fa0021a..320dad0 100644 --- a/modules/java/gen_java.py +++ b/modules/java/gen_java.py @@ -1248,6 +1248,7 @@ extern "C" { clazz = self.classes[fi.classname].jname cpp_code.write ( Template( \ """ +JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname ($argst); JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname ($args) @@ -1278,7 +1279,8 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname module = self.module, \ clazz = clazz.replace('_', '_1'), \ fname = (fi.jname + '_' + str(suffix_counter)).replace('_', '_1'), \ - args = ", ".join(["%s %s" % (type_dict[a.ctype].get("jni_type"), a.name) for a in jni_args]), \ + args = ", ".join(["%s %s" % (type_dict[a.ctype].get("jni_type"), a.name) for a in jni_args]), \ + argst = ", ".join([type_dict[a.ctype].get("jni_type") for a in jni_args]), \ prologue = "\n ".join(c_prologue), \ epilogue = " ".join(c_epilogue), \ ret = ret, \ @@ -1370,6 +1372,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname // native support for java finalize() // static void %(cls)s::delete( __int64 self ) // +JNIEXPORT void JNICALL Java_org_opencv_%(module)s_%(j_cls)s_delete(JNIEnv*, jclass, jlong); JNIEXPORT void JNICALL Java_org_opencv_%(module)s_%(j_cls)s_delete (JNIEnv* env, jclass cls, jlong self) -- 2.7.4