enumvalueex attribute now set during the type pass
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5923 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ca13628e60
commit
915454d6ef
1 changed files with 10 additions and 0 deletions
|
|
@ -782,6 +782,16 @@ class TypePass : private Dispatcher {
|
||||||
Setattr(n,"value",new_value);
|
Setattr(n,"value",new_value);
|
||||||
Delete(new_value);
|
Delete(new_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make up an enumvalue if one was not specified in the parsed code
|
||||||
|
if (Getattr(n,"_last") && !Getattr(n,"enumvalue")) { // Only the first enum item has _last set
|
||||||
|
Setattr(n,"enumvalueex", "0");
|
||||||
|
}
|
||||||
|
Node *next = nextSibling(n);
|
||||||
|
if (next && !Getattr(next,"enumvalue")) {
|
||||||
|
Setattr(next,"enumvalueex", NewStringf("%s + 1", Getattr(n,"sym:name")));
|
||||||
|
}
|
||||||
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue