CFFI - fix junk output when wrapping single character constants
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13944 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
89052f3b0a
commit
7ca0497647
2 changed files with 3 additions and 3 deletions
|
|
@ -1021,9 +1021,8 @@ String *CFFI::convert_literal(String *literal, String *type, bool try_to_split)
|
|||
return num;
|
||||
} else if (SwigType_type(type) == T_CHAR) {
|
||||
/* Use CL syntax for character literals */
|
||||
String* result = NewStringf("#\\%c", s[2]);
|
||||
String* result = NewStringf("#\\%c", s[0]);
|
||||
Delete(num);
|
||||
// Printf(stderr, "%s %c %d", s, s[2], s);
|
||||
return result;
|
||||
} else if (SwigType_type(type) == T_STRING) {
|
||||
/* Use CL syntax for string literals */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue