Patch 1656395
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9649 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e38a14b2df
commit
ea90e889fa
2 changed files with 9 additions and 5 deletions
|
|
@ -970,11 +970,12 @@ String *CFFI::convert_literal(String *literal, String *type, bool try_to_split)
|
|||
}
|
||||
|
||||
if (Len(num) >= 2 && s[0] == '0') { /* octal or hex */
|
||||
Delete(num);
|
||||
if (s[1] == 'x')
|
||||
return NewStringf("#x%s", s + 2);
|
||||
else
|
||||
return NewStringf("#o%s", s + 1);
|
||||
if (s[1] == 'x'){
|
||||
DohReplace(num,"0","#",DOH_REPLACE_FIRST);
|
||||
}
|
||||
else{
|
||||
DohReplace(num,"0","#o",DOH_REPLACE_FIRST);
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue