X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b3378a02d0a811be38e530933fb9a57a3012a823..66170b30c7577168b02b9980304f35026a94de1a:/Internal.hpp diff --git a/Internal.hpp b/Internal.hpp index 1d9e7c5..032f216 100644 --- a/Internal.hpp +++ b/Internal.hpp @@ -1,5 +1,5 @@ /* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2010 Jay Freeman (saurik) + * Copyright (C) 2009-2012 Jay Freeman (saurik) */ /* GNU Lesser General Public License, Version 3 {{{ */ @@ -35,6 +35,11 @@ JSGlobalContextRef CYGetJSContext(JSContextRef context); void Structor_(apr_pool_t *pool, sig::Type *&type); +JSObjectRef CYMakeType(JSContextRef context, const char *type); +JSObjectRef CYMakeType(JSContextRef context, sig::Type *type); + +extern JSClassRef Functor_; + struct Type_privateData : CYData { @@ -167,7 +172,7 @@ struct Functor : sig::sig_ffi_cif(pool_, &sig::ObjectiveC, &signature_, &cif_); } - void (*GetValue())() const { + void (*GetValue() const)() { return reinterpret_cast(value_); } @@ -196,5 +201,6 @@ struct Closure_privateData : }; Closure_privateData *CYMakeFunctor_(JSContextRef context, JSObjectRef function, const char *type, void (*callback)(ffi_cif *, void *, void **, void *)); +void CYExecuteClosure(ffi_cif *cif, void *result, void **arguments, void *arg, JSValueRef (*adapter)(JSContextRef, size_t, JSValueRef[], JSObjectRef)); #endif/*CYCRIPT_INTERNAL_HPP*/