]> git.saurik.com Git - cycript.git/commitdiff
When casting function pointers, it's more complex.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 12 Jan 2014 08:00:44 +0000 (00:00 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 12 Jan 2014 08:00:44 +0000 (00:00 -0800)
Execute.cpp

index 25ab02b10969a83c84b923f1135b620d2d54ee93..7bf6c7d19e1797b4ca98575623b164b6612b6149 100644 (file)
@@ -1174,7 +1174,7 @@ static JSValueRef Type_callAsFunction(JSContextRef context, JSObjectRef object,
     Type_privateData *internal(reinterpret_cast<Type_privateData *>(JSObjectGetPrivate(object)));
 
     if (internal->type_->primitive == sig::function_P)
-        return CYMakeFunctor(context, reinterpret_cast<void (*)()>(static_cast<uintptr_t>(CYCastDouble(context, arguments[0]))), internal->type_->data.signature);
+        return CYMakeFunctor(context, arguments[0], internal->type_->data.signature);
 
     sig::Type *type(internal->type_);
     ffi_type *ffi(internal->GetFFI());