Fix uncompileable code when %rename results in two enum items with the same name

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12098 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-06-03 17:44:42 +00:00
commit 257ce20f30
4 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,12 @@
%module enum_rename
%warnfilter(SWIGWARN_PARSE_REDEFINED) S_May;
// %rename with rxspencer can do the equivalent of these two renames, which was resulting in uncompileable code
%rename(May) M_May;
%rename(May) S_May;
%inline %{
enum Month { M_Jan, M_May, M_Dec };
enum Severity { S_May, S_Can, S_Must };
%}