From: Jay Freeman (saurik) Date: Sat, 31 Oct 2009 02:29:50 +0000 (+0000) Subject: Ported back to the iPhone. X-Git-Tag: v0.9.432~224 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/ec599edfb07d298f2224e8e816595a5f73f48105 Ported back to the iPhone. --- diff --git a/ObjectiveC/Internal.hpp b/ObjectiveC/Internal.hpp index b6d683a..f305fa9 100644 --- a/ObjectiveC/Internal.hpp +++ b/ObjectiveC/Internal.hpp @@ -79,10 +79,6 @@ struct Instance : static JSObjectRef Make(JSContextRef context, id object, Flags flags = None); - static _finline JSObjectRef Make(JSContextRef context, Class object) { - return Make(context, (id) object); - } - _finline id GetValue() const { return reinterpret_cast(value_); } diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index a718bb8..787a81f 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -1060,7 +1060,7 @@ JSValueRef CYCastJSValue(JSContextRef context, id value) { CYPoolTry { - (NSEnumerator *) keyEnumerator { CYObjectiveTry { JSPropertyNameArrayRef names(JSObjectCopyPropertyNames(context_, object_)); - NSEnumerator *enumerator([CYCastNSArray(names) objectEnumerator]); + NSEnumerator *enumerator([CYCastNSArray(context_, names) objectEnumerator]); JSPropertyNameArrayRelease(names); return enumerator; } CYObjectiveCatch } @@ -2050,7 +2050,7 @@ static JSValueRef CYValue_callAsFunction_$cya(JSContextRef context, JSObjectRef static JSValueRef Instance_getProperty_constructor(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) { Instance *internal(reinterpret_cast(JSObjectGetPrivate(object))); - return Instance::Make(context, object_getClass(internal->GetValue())); + return Instance::Make(context, (id) object_getClass(internal->GetValue())); } static JSValueRef Instance_getProperty_protocol(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) { CYTry {