X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/079cab1b73aea2d0a569e9880596e27b21144e73..8b8a64c5f9b3e638ee850b3a8a09803328fa7603:/ObjectiveC/Library.mm diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index 32426a5..24ff4ce 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -413,7 +413,7 @@ JSObjectRef Instance::Make(JSContextRef context, id object, Flags flags) { } Instance::~Instance() { - if ((flags_ & Transient) == 0) + if ((flags_ & Permanent) == 0) [GetValue() release]; } @@ -429,11 +429,11 @@ struct Message_privateData : } }; -JSObjectRef CYMakeInstance(JSContextRef context, id object, bool transient) { +JSObjectRef CYMakeInstance(JSContextRef context, id object, bool permanent) { Instance::Flags flags; - if (transient) - flags = Instance::Transient; + if (permanent) + flags = Instance::Permanent; else { flags = Instance::None; object = [object retain]; @@ -2840,8 +2840,8 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { CYPool &pool(CYGetGlobalPool()); - Object_type = new(pool) Type_privateData("@"); - Selector_type = new(pool) Type_privateData(":"); + Object_type = new(pool) Type_privateData(sig::object_P); + Selector_type = new(pool) Type_privateData(sig::selector_P); NSArray_ = objc_getClass("NSArray"); NSBlock_ = objc_getClass("NSBlock");