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:
William S Fulton 2012-12-02 13:36:40 +00:00
commit 7ca0497647
2 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,8 @@ Version 2.0.9 (in progress)
This make module loading behaviour reliably consistent, and reduces problems when loading modules which This make module loading behaviour reliably consistent, and reduces problems when loading modules which
depend on other modules which may not have been previously loaded. depend on other modules which may not have been previously loaded.
*** POTENTIAL INCOMPATIBILITY *** 2012-11-27: wsfulton
[cffi] Fix junk output when wrapping single character literal constants.
2012-11-17: wsfulton 2012-11-17: wsfulton
[Tcl, Modula3] Add missing support for -outdir. [Tcl, Modula3] Add missing support for -outdir.

View file

@ -1021,9 +1021,8 @@ String *CFFI::convert_literal(String *literal, String *type, bool try_to_split)
return num; return num;
} else if (SwigType_type(type) == T_CHAR) { } else if (SwigType_type(type) == T_CHAR) {
/* Use CL syntax for character literals */ /* Use CL syntax for character literals */
String* result = NewStringf("#\\%c", s[2]); String* result = NewStringf("#\\%c", s[0]);
Delete(num); Delete(num);
// Printf(stderr, "%s %c %d", s, s[2], s);
return result; return result;
} else if (SwigType_type(type) == T_STRING) { } else if (SwigType_type(type) == T_STRING) {
/* Use CL syntax for string literals */ /* Use CL syntax for string literals */