From d445b3594e8bb71b12cdf6e0f354be4eaa042d12 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 3 Apr 2003 12:11:55 +0000 Subject: [PATCH] Removed deprecated pragmas Use %javaconst(1) for enums and constants git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4659 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/java/constants/example.i | 3 +++ SWIG/Examples/java/enum/example.i | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SWIG/Examples/java/constants/example.i b/SWIG/Examples/java/constants/example.i index 4f7b1a4d7..76665fca0 100644 --- a/SWIG/Examples/java/constants/example.i +++ b/SWIG/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/SWIG/Examples/java/enum/example.i b/SWIG/Examples/java/enum/example.i index 4c873824c..fb6568943 100644 --- a/SWIG/Examples/java/enum/example.i +++ b/SWIG/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 */