%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:
parent
3c6a4d6f6a
commit
19daf19bfa
3 changed files with 41 additions and 1 deletions
12
Examples/test-suite/java_enums.i
Normal file
12
Examples/test-suite/java_enums.i
Normal 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 };
|
||||
%}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue