Java/C# - test extra constructor to handle enum items initialised by another enum item for %javaconst(1)/%csconst(1)

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7868 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-11-26 08:37:20 +00:00
commit 7ff35f487a
8 changed files with 79 additions and 0 deletions

View file

@ -474,4 +474,27 @@ struct Instances {
%}
// Repeated values
#if defined(SWIGJAVA)
%javaconst(1);
#elif defined(SWIGCSHARP)
%csconst(1);
#endif
%inline %{
namespace RepeatSpace {
typedef enum
{
one = 1,
initial = one,
two,
three,
last = three,
end = last
} repeat;
repeat repeatTest(repeat e) { return e; }
}
%}