]> git.saurik.com Git - cycript.git/blobdiff - Execute.cpp
The desugaring for typedef skipped signatures.
[cycript.git] / Execute.cpp
index 4282965048dc39457253f8d35b627c6d9cd994fe..eb1970e89e7d38b6da286f3c9e8ace794d3341bb 100644 (file)
@@ -1139,11 +1139,18 @@ static JSValueRef Type_callAsFunction_pointerTo(JSContextRef context, JSObjectRe
 
     sig::Type type;
     type.name = NULL;
-    type.flags = 0;
 
-    type.primitive = sig::pointer_P;
-    type.data.data.type = internal->type_;
-    type.data.data.size = 0;
+    if (internal->type_->primitive == sig::char_P) {
+        type.flags = internal->type_->flags;
+        type.primitive = sig::string_P;
+        type.data.data.type = NULL;
+        type.data.data.size = 0;
+    } else {
+        type.flags = 0;
+        type.primitive = sig::pointer_P;
+        type.data.data.type = internal->type_;
+        type.data.data.size = 0;
+    }
 
     return CYMakeType(context, &type);
 } CYCatch(NULL) }