]> git.saurik.com Git - cycript.git/blobdiff - Execute.cpp
Separate useful CYPoolCode from CydgetMemoryParse.
[cycript.git] / Execute.cpp
index 25ab02b10969a83c84b923f1135b620d2d54ee93..d6da9cba224ddd20cdcd9db887f5000ad26cf647 100644 (file)
@@ -720,7 +720,7 @@ Closure_privateData *CYMakeFunctor_(JSContextRef context, JSObjectRef function,
     // XXX: in point of fact, this may /need/ to leak :(
     Closure_privateData *internal(new Closure_privateData(context, function, signature));
 
-#if defined(__APPLE__) && defined(__arm__)
+#if defined(__APPLE__) && (defined(__arm__) || defined(__arm64__))
     void *executable;
     ffi_closure *writable(reinterpret_cast<ffi_closure *>(ffi_closure_alloc(sizeof(ffi_closure), &executable)));
 
@@ -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());