diff options
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaEmitter.java | 4 | ||||
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJNICode.cfg | 13 | ||||
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJavaCode.java.stub (renamed from src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJavaCode.cfg) | 0 | ||||
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/test1-common.cfg | 8 | ||||
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-CustomJNICode.c.stub | 5 |
5 files changed, 13 insertions, 17 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index 0a403ea..784976a 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -722,8 +722,12 @@ public class JavaEmitter implements GlueEmitter { if (cfg.allStatic() || cfg.emitInterface()) { emitCustomJavaCode(javaUnit(), cfg.className()); } + if( cfg.allStatic() && cfg.emitImpl()) { + emitCustomJNICode(cUnit(), cfg.className()); + } if (!cfg.allStatic() && cfg.emitImpl()) { emitCustomJavaCode(javaImplUnit(), cfg.implClassName()); + emitCustomJNICode(cUnit(), cfg.implClassName()); } } } diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJNICode.cfg b/src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJNICode.cfg deleted file mode 100644 index b76997d..0000000 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJNICode.cfg +++ /dev/null @@ -1,13 +0,0 @@ -#include "test1.h" - -JNIEXPORT jobject JNICALL -com.jogamp.gluegen.test.junit.generation -Java_com_jogamp_gluegen_test_junit_generation_Bindingtest1p1_I_returnFooImpl(JNIEnv *env, jobject _unused) { - return FOO_VALUE; -} - -JNIEXPORT jobject JNICALL -com.jogamp.gluegen.test.junit.generation -Java_com_jogamp_gluegen_test_junit_generation_Bindingtest1p2_I_returnFooImpl(JNIEnv *env, jobject _unused) { - return FOO_VALUE; -}
\ No newline at end of file diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJavaCode.cfg b/src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJavaCode.java.stub index c210ec9..c210ec9 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJavaCode.cfg +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test1-CustomJavaCode.java.stub diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-common.cfg b/src/junit/com/jogamp/gluegen/test/junit/generation/test1-common.cfg index e01f748..05bed70 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-common.cfg +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test1-common.cfg @@ -48,10 +48,10 @@ RenameJavaSymbol testXID_EXT testXID DelegateImplementation testDelegate testDelegateOrigImpl CustomJavaCode Bindingtest1 public int getFoo(); -IncludeAs CustomJavaCode Bindingtest1p1Impl test1-CustomJavaCode.cfg -IncludeAs CustomJNICode Bindingtest1p1Impl test1-CustomJNICode.cfg -IncludeAs CustomJavaCode Bindingtest1p2Impl test1-CustomJavaCode.cfg -IncludeAs CustomJNICode Bindingtest1p2Impl test1-CustomJNICode.cfg +IncludeAs CustomJavaCode Bindingtest1p1Impl test1-CustomJavaCode.java.stub +IncludeAs CustomJNICode Bindingtest1p1Impl test1p1-CustomJNICode.c.stub +IncludeAs CustomJavaCode Bindingtest1p2Impl test1-CustomJavaCode.java.stub +IncludeAs CustomJNICode Bindingtest1p2Impl test1p2-CustomJNICode.c.stub StructPackage TK_Dimension com.jogamp.gluegen.test.junit.generation EmitStruct TK_Dimension diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-CustomJNICode.c.stub b/src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-CustomJNICode.c.stub new file mode 100644 index 0000000..bee94f2 --- /dev/null +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-CustomJNICode.c.stub @@ -0,0 +1,5 @@ + +JNIEXPORT jint JNICALL Java_com_jogamp_gluegen_test_junit_generation_impl_Bindingtest1p2Impl_returnFooImpl(JNIEnv *env, jobject _unused) { + return FOO_VALUE; +} + |