]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Library.mm
-[NSCFType cy$toJSON:inContext:] 64-bit encoding.
[cycript.git] / ObjectiveC / Library.mm
index dddbd951740f3ec806dd7ac14f324c67cffa13bf..7c364adca3fd591d5cbedec8091eb2c59c4c0fc4 100644 (file)
@@ -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<IMP>(&NSCFType$cy$toJSON$inContext$), "^{OpaqueJSValue=}32@0:8@16^{OpaqueJSContext=}24");
+#else
     class_addMethod(NSCFType_, @selector(cy$toJSON:inContext:), reinterpret_cast<IMP>(&NSCFType$cy$toJSON$inContext$), "^{OpaqueJSValue=}16@0:4@8^{OpaqueJSContext=}12");
 #endif
+#endif
 } CYPoolCatch() }
 
 void CYObjectiveC_SetupContext(JSContextRef context) { CYPoolTry {