From: Jay Freeman (saurik) Date: Thu, 9 Jan 2014 04:48:21 +0000 (-0800) Subject: -[NSCFType cy$toJSON:inContext:] 64-bit encoding. X-Git-Tag: v0.9.500~94 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/f9393f362bbce8751d8befb86f9e28ea5be1a335 -[NSCFType cy$toJSON:inContext:] 64-bit encoding. --- diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index dddbd95..7c364ad 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -2734,8 +2734,13 @@ void CYObjectiveC_Initialize() { /*XXX*/ JSContextRef context(NULL); CYPoolTry { ObjectiveC_Protocols_ = JSClassCreate(&definition); #ifdef __APPLE__ +// XXX: this is horrible; there has to be a better way to do this +#ifdef __LP64__ + class_addMethod(NSCFType_, @selector(cy$toJSON:inContext:), reinterpret_cast(&NSCFType$cy$toJSON$inContext$), "^{OpaqueJSValue=}32@0:8@16^{OpaqueJSContext=}24"); +#else class_addMethod(NSCFType_, @selector(cy$toJSON:inContext:), reinterpret_cast(&NSCFType$cy$toJSON$inContext$), "^{OpaqueJSValue=}16@0:4@8^{OpaqueJSContext=}12"); #endif +#endif } CYPoolCatch() } void CYObjectiveC_SetupContext(JSContextRef context) { CYPoolTry {