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:
parent
c5f363312c
commit
26f516695e
1 changed files with 6 additions and 1 deletions
|
|
@ -404,11 +404,16 @@ int Language::constantDirective(Node *n) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
value = Copy(name);
|
value = Copy(name);
|
||||||
} else {
|
} else {
|
||||||
if (checkAttribute(n,"type","char")) {
|
/* if (checkAttribute(n,"type","char")) {
|
||||||
value = NewString(value);
|
value = NewString(value);
|
||||||
} else {
|
} else {
|
||||||
value = NewStringf("%(escape)s", value);
|
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);
|
Setattr(n,"value", value);
|
||||||
this->constantWrapper(n);
|
this->constantWrapper(n);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue