CFFI - Fix some string constants are incorrect
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13963 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1ab67f5bed
commit
04b60a1508
3 changed files with 11 additions and 1 deletions
|
|
@ -565,7 +565,13 @@ void CFFI::emit_defun(Node *n, String *name) {
|
|||
|
||||
int CFFI::constantWrapper(Node *n) {
|
||||
String *type = Getattr(n, "type");
|
||||
String *converted_value = convert_literal(Getattr(n, "value"), type);
|
||||
String *converted_value;
|
||||
if (SwigType_type(type) == T_STRING) {
|
||||
converted_value = NewString(Getattr(n, "rawval"));
|
||||
} else {
|
||||
converted_value = convert_literal(Getattr(n, "value"), type);
|
||||
}
|
||||
|
||||
String *name = lispify_name(n, Getattr(n, "sym:name"), "'constant");
|
||||
|
||||
if (Strcmp(name, "t") == 0 || Strcmp(name, "T") == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue