Fix for a few affected target languages since last commit changed the way enum values that are type char are handled.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12558 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b13ec94386
commit
b57a12fa21
6 changed files with 18 additions and 17 deletions
|
|
@ -578,12 +578,16 @@ public:
|
|||
String *symname = Getattr(n, "sym:name");
|
||||
SwigType *type = Getattr(n, "type");
|
||||
String *value = Getattr(n, "value");
|
||||
bool is_enum_item = (Cmp(nodeType(n), "enumitem") == 0);
|
||||
|
||||
/* Special hook for member pointer */
|
||||
if (SwigType_type(type) == T_MPOINTER) {
|
||||
/* Special hook for member pointer */
|
||||
String *wname = Swig_name_wrapper(symname);
|
||||
Printf(f_header, "static %s = %s;\n", SwigType_str(type, wname), value);
|
||||
value = wname;
|
||||
} else if (SwigType_type(type) == T_CHAR && is_enum_item) {
|
||||
type = NewSwigType(T_INT);
|
||||
Setattr(n, "type", type);
|
||||
}
|
||||
|
||||
/* Perform constant typemap substitution */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue