%javaconst(1) feature for enums so that using enum values do not have to make a JNI call.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4361 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-02-19 22:58:37 +00:00
commit 19daf19bfa
3 changed files with 41 additions and 1 deletions

View file

@ -0,0 +1,12 @@
// This testcase uses the %javaconst directive to control how enums are initialised
%module java_enums
// Set default Java const code generation
%javaconst(1);
%inline %{
enum stuff { FIDDLE = 2*100, STICKS = 5+8, BONGO, DRUMS };
%}