Fixed [ 642112 ] Constants char bug

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4402 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-02-26 19:13:28 +00:00
commit 8ab03e95ec
2 changed files with 8 additions and 2 deletions

View file

@ -4120,9 +4120,11 @@ definetype : { /* scanner_check_typedef(); */ } expr {
| CHARCONST {
$$.val = NewString($1);
if (Len($$.val)) {
$$.rawval = NewStringf("\'%(escape)s\'",$$.val);
/* $$.rawval = NewStringf("\'%(escape)s\'",$$.val); */
$$.rawval = NewStringf("\'%s\'", $$.val);
} else {
$$.rawval = NewString("\'\\0'");
$$.val = NewString("\\0");
}
$$.type = T_CHAR;
$$.bitfield = 0;