diff --git a/Examples/java/constants/example.i b/Examples/java/constants/example.i index 4f7b1a4d7..76665fca0 100644 --- a/Examples/java/constants/example.i +++ b/Examples/java/constants/example.i @@ -1,6 +1,9 @@ /* File : example.i */ %module example +/* Force the generated Java code to use the C constant values rather than making a JNI call */ +%javaconst(1); + /* A few preprocessor macros */ #define ICONST 42 diff --git a/Examples/java/enum/example.i b/Examples/java/enum/example.i index 4c873824c..fb6568943 100644 --- a/Examples/java/enum/example.i +++ b/Examples/java/enum/example.i @@ -5,7 +5,8 @@ #include "example.h" %} -%pragma make_default +/* Force the generated Java code to use the C enum values rather than making a JNI call */ +%javaconst(1); /* Let's just grab the original header file here */