X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/67110a156d28581856737ca3de13b4dbe4718288..c22e009d49bb891a560f8a6219fe3499859eff4b:/Internal.hpp?ds=inline diff --git a/Internal.hpp b/Internal.hpp index b4dd4a1..cf35708 100644 --- a/Internal.hpp +++ b/Internal.hpp @@ -73,8 +73,9 @@ struct Type_privateData : Type_privateData(sig::Type *type) : ffi_(NULL) { - if (type != NULL) - Set(type); + // XXX: just in case I messed up migrating + _assert(type != NULL); + Set(type); } Type_privateData(sig::Type *type, ffi_type *ffi) { @@ -85,8 +86,6 @@ struct Type_privateData : ffi_type *GetFFI() { if (ffi_ == NULL) { - ffi_ = new(*pool_) ffi_type; - sig::Element element; element.name = NULL; element.type = type_; @@ -98,6 +97,8 @@ struct Type_privateData : ffi_cif cif; sig::sig_ffi_cif(*pool_, &sig::ObjectiveC, &signature, &cif); + + ffi_ = new(*pool_) ffi_type; *ffi_ = *cif.rtype; } @@ -189,6 +190,7 @@ struct Functor : } static JSStaticFunction const * const StaticFunctions; + static JSStaticValue const * const StaticValues; }; } struct Closure_privateData :