Patch 1656395

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9649 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Surendra Singhi 2007-02-26 13:16:01 +00:00
commit ea90e889fa
2 changed files with 9 additions and 5 deletions

View file

@ -1,6 +1,9 @@
Version 1.3.32 (in progress)
============================
02/26/2007: efuzzyone
[CFFI] Patch #1656395: fixed hex and octal values bug, thanks to Arthur Smyles.
02/22/2007: mgossage
[Lua] Fixed bug in typemaps which caused derived_byvalue and rname test cases to fail.
Updated derived_byvalue.i to explain how to find and fix the problem

View file

@ -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;
}