]> git.saurik.com Git - cydia.git/commitdiff
Move WebScriptObject (NSFastEnumeration) to (Cyte).
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 1 Mar 2011 05:21:58 +0000 (21:21 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:31 +0000 (02:41 -0800)
CyteKit/WebScriptObject-Cyte.h
CyteKit/WebScriptObject-Cyte.mm
MobileCydia.mm

index 6da0d8cabdbc948806e90017b3250a570f64552a..d071ea668823ef75ad0bfc0af0ff60c4995f46d9 100644 (file)
@@ -44,6 +44,7 @@
 
 @interface WebScriptObject (Cyte)
 - (NSUInteger) count;
+- (NSUInteger) countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)objects count:(NSUInteger)count;
 - (id) objectAtIndex:(unsigned)index;
 @end
 
index 9df6f85a308cc78b74740c37bdef2ed9f7ae4e23..36b02dde624d3002df07869292586860684c6c0e 100644 (file)
     return [self webScriptValueAtIndex:index];
 }
 
+- (NSUInteger) countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)objects count:(NSUInteger)count {
+    size_t length([self count] - state->state);
+    if (length <= 0)
+        return 0;
+    else if (length > count)
+        length = count;
+    for (size_t i(0); i != length; ++i)
+        objects[i] = [self objectAtIndex:state->state++];
+    state->itemsPtr = objects;
+    state->mutationsPtr = (unsigned long *) self;
+    return length;
+}
+
 @end
index 150754143678c60392e187e2c5f15a8a288e3a21..132c31e949d3870359402946c07a1de927571167 100644 (file)
@@ -588,23 +588,6 @@ void CFArrayInsertionSortValues(CFMutableArrayRef array, CFRange range, CFCompar
 
 @end
 
-@implementation WebScriptObject (NSFastEnumeration)
-
-- (NSUInteger) countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)objects count:(NSUInteger)count {
-    size_t length([self count] - state->state);
-    if (length <= 0)
-        return 0;
-    else if (length > count)
-        length = count;
-    for (size_t i(0); i != length; ++i)
-        objects[i] = [self objectAtIndex:state->state++];
-    state->itemsPtr = objects;
-    state->mutationsPtr = (unsigned long *) self;
-    return length;
-}
-
-@end
-
 NSUInteger DOMNodeList$countByEnumeratingWithState$objects$count$(DOMNodeList *self, SEL sel, NSFastEnumerationState *state, id *objects, NSUInteger count) {
     size_t length([self length] - state->state);
     if (length <= 0)