Fixed problem in enum parsing.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@561 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d56f8f02f1
commit
22531698e5
1 changed files with 5 additions and 2 deletions
|
|
@ -1796,7 +1796,10 @@ edecl : ID {
|
||||||
temp_typeptr = new DataType($4.type);
|
temp_typeptr = new DataType($4.type);
|
||||||
// Use enum name instead of value
|
// Use enum name instead of value
|
||||||
// OLD create_constant($1, temp_typeptr, $4.id);
|
// OLD create_constant($1, temp_typeptr, $4.id);
|
||||||
create_constant($1, temp_typeptr, $1);
|
if ($4.type == T_CHAR)
|
||||||
|
create_constant($1,temp_typeptr, $4.id);
|
||||||
|
else
|
||||||
|
create_constant($1, temp_typeptr, $1);
|
||||||
delete temp_typeptr;
|
delete temp_typeptr;
|
||||||
scanner_ignore_typedef();
|
scanner_ignore_typedef();
|
||||||
}
|
}
|
||||||
|
|
@ -1817,7 +1820,7 @@ etype : expr {
|
||||||
}
|
}
|
||||||
| CHARCONST {
|
| CHARCONST {
|
||||||
$$.id = $1;
|
$$.id = $1;
|
||||||
$$.type = T_CHAR;
|
$$.type = T_INT;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue