Fix incorrect symbol clash error in C# and Java when using %rename for enums
When using using 'simple enum' wrappers
This commit is contained in:
parent
ede58b8744
commit
fcef37d682
4 changed files with 17 additions and 2 deletions
|
|
@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
|
||||||
Version 3.0.3 (in progress)
|
Version 3.0.3 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2014-11-21: wsfulton
|
||||||
|
[Java C#] Fix multiply defined error when using %rename of enum items when using the "simple enum" wrappers.
|
||||||
|
|
||||||
2014-10-28: vadz
|
2014-10-28: vadz
|
||||||
[Python] Patch #201 The generated .py file no longer uses *args for all Python parameters.
|
[Python] Patch #201 The generated .py file no longer uses *args for all Python parameters.
|
||||||
Instead, the parameters are named using the C++ parameter names.
|
Instead, the parameters are named using the C++ parameter names.
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,18 @@ OldNameStruct::doublenametag renameTest6(OldNameStruct::doublenametag e)
|
||||||
OldNameStruct::singlename renameTest7(OldNameStruct::singlename e) { return e; }
|
OldNameStruct::singlename renameTest7(OldNameStruct::singlename e) { return e; }
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%rename(Clash1_di1) Clash1::di1;
|
||||||
|
%rename(Clash1_di2) Clash1::di2;
|
||||||
|
%rename(Clash1_di3) Clash1::di3;
|
||||||
|
%inline %{
|
||||||
|
namespace Clash1 {
|
||||||
|
enum DuplicateItems1 { di1, di2 = 10, di3 };
|
||||||
|
}
|
||||||
|
namespace Clash2 {
|
||||||
|
enum DuplicateItems2 { di1, di2 = 10, di3 };
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct TreesClass {
|
struct TreesClass {
|
||||||
enum trees {oak, fir, pine };
|
enum trees {oak, fir, pine };
|
||||||
|
|
|
||||||
|
|
@ -1308,7 +1308,7 @@ public:
|
||||||
else
|
else
|
||||||
Printf(scope, ".%s", Getattr(parent, "sym:name"));
|
Printf(scope, ".%s", Getattr(parent, "sym:name"));
|
||||||
}
|
}
|
||||||
if (!addSymbol(name, n, scope))
|
if (!addSymbol(symname, n, scope))
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
|
|
||||||
const String *csattributes = Getattr(n, "feature:cs:attributes");
|
const String *csattributes = Getattr(n, "feature:cs:attributes");
|
||||||
|
|
|
||||||
|
|
@ -1410,7 +1410,7 @@ public:
|
||||||
else
|
else
|
||||||
Printf(scope, ".%s", Getattr(parent, "sym:name"));
|
Printf(scope, ".%s", Getattr(parent, "sym:name"));
|
||||||
}
|
}
|
||||||
if (!addSymbol(name, n, scope))
|
if (!addSymbol(symname, n, scope))
|
||||||
return SWIG_ERROR;
|
return SWIG_ERROR;
|
||||||
|
|
||||||
if ((enum_feature == ProperEnum) && parent_name && !unnamedinstance) {
|
if ((enum_feature == ProperEnum) && parent_name && !unnamedinstance) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue