summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2012-12-14 08:00:22 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2012-12-14 08:00:22 +0000
commit04b60a150865fa10b6ebabd60882c7b56681ce7e (patch)
tree1b60c85b465cd7c5eaf74cb0b5922c5cd0ce167a /Source
parent1ab67f5bed7e10f4f67dda4d2d161e3e881bbbce (diff)
downloadswig-04b60a150865fa10b6ebabd60882c7b56681ce7e.tar.gz
CFFI - Fix some string constants are incorrect
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13963 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/cffi.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Modules/cffi.cxx b/Source/Modules/cffi.cxx
index d3f0391d0..88f82b647 100644
--- a/Source/Modules/cffi.cxx
+++ b/Source/Modules/cffi.cxx
@@ -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)