Fix Octave C enums wrapping when the generated code is C++ compiled
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12022 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e854baabec
commit
3cf41050b5
3 changed files with 21 additions and 8 deletions
|
|
@ -807,11 +807,15 @@ class TypePass:private Dispatcher {
|
|||
value = name;
|
||||
if (Strcmp(value, name) == 0) {
|
||||
String *new_value;
|
||||
if (((nsname) || (inclass)) && cparse_cplusplus) {
|
||||
if ((nsname || inclass) && cparse_cplusplus) {
|
||||
new_value = NewStringf("%s::%s", SwigType_namestr(Swig_symbol_qualified(n)), value);
|
||||
} else {
|
||||
new_value = NewString(value);
|
||||
}
|
||||
if ((nsname || inclass) && !cparse_cplusplus) {
|
||||
String *cppvalue = NewStringf("%s::%s", SwigType_namestr(Swig_symbol_qualified(n)), value);
|
||||
Setattr(n, "cppvalue", cppvalue); /* for target languages that always generate C++ code even when wrapping C code */
|
||||
}
|
||||
Setattr(n, "value", new_value);
|
||||
Delete(new_value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue