Fix to constant handling.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4493 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-03-10 14:01:42 +00:00
commit 26f516695e

View file

@ -404,11 +404,16 @@ int Language::constantDirective(Node *n) {
if (!value) {
value = Copy(name);
} else {
if (checkAttribute(n,"type","char")) {
/* if (checkAttribute(n,"type","char")) {
value = NewString(value);
} else {
value = NewStringf("%(escape)s", value);
}
*/
Setattr(n,"rawvalue",value);
value = NewStringf("%(escape)s", value);
if (!Len(value)) Append(value,"\\0");
/* Printf(stdout,"'%s' = '%s'\n", name, value); */
}
Setattr(n,"value", value);
this->constantWrapper(n);