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:
William S Fulton 2011-03-26 23:25:14 +00:00
commit b57a12fa21
6 changed files with 18 additions and 17 deletions

View file

@ -927,9 +927,10 @@ public:
// Create variable and assign it a value
Printf(f_header, "static %s = ", SwigType_lstr(type, name));
bool is_enum_item = (Cmp(nodeType(n), "enumitem") == 0);
if ((SwigType_type(type) == T_STRING)) {
Printf(f_header, "\"%s\";\n", value);
} else if (SwigType_type(type) == T_CHAR) {
} else if (SwigType_type(type) == T_CHAR && !is_enum_item) {
Printf(f_header, "\'%s\';\n", value);
} else {
Printf(f_header, "%s;\n", value);