]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Library.mm
Implement all of the crazy ECMAScript octal stuff.
[cycript.git] / ObjectiveC / Library.mm
index ca85258b272c1d8520a44f17f4fea31fa068f66f..dccc3ad3b8a9488f13d6dbd4a382604d8980067c 100644 (file)
@@ -1083,6 +1083,21 @@ NSObject *CYCopyNSObject(CYPool &pool, JSContextRef context, JSValueRef value) {
     return true;
 }
 
+@end
+/* }}} */
+/* Bridge: NSOrderedSet {{{ */
+@implementation NSOrderedSet (Cycript)
+
+- (NSString *) cy$toCYON:(bool)objective inSet:(std::set<void *> &)objects {
+    _oassert(objects.insert(self).second);
+
+    NSMutableString *json([[[NSMutableString alloc] init] autorelease]);
+    [json appendString:@"[NSOrderedSet orderedSetWithArray:"];
+    [json appendString:CYCastNSCYON([self array], true, objects)];
+    [json appendString:@"]]"];
+    return json;
+}
+
 @end
 /* }}} */
 /* Bridge: NSProxy {{{ */