X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/67110a156d28581856737ca3de13b4dbe4718288..03db6a67c728f631b6c6f6fd140eb86a8050cf12:/Internal.hpp diff --git a/Internal.hpp b/Internal.hpp index b4dd4a1..7c278b4 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; }