Skip to content
Browse files

added fast enumeration

  • Loading branch information...
1 parent e399071 commit 6aa5271038da7a75cc3ca9cb2fae8ea58dd22506 Mike Laurence committed
Showing with 14 additions and 1 deletion.
  1. +1 −1 CoreResult.h
  2. +13 −0 CoreResult.m
View
2 CoreResult.h
@@ -11,7 +11,7 @@
@class CoreResource;
-@interface CoreResult : NSObject {
+@interface CoreResult : NSObject <NSFastEnumeration> {
id source;
NSArray* resources;
NSError* error;
View
13 CoreResult.m
@@ -48,6 +48,19 @@ - (int) resourceCount {
}
+
+#pragma mark -
+#pragma mark Fast enumeration
+
+- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState*)state objects:(id*)stackbuf count:(NSUInteger)len {
+ return [resources countByEnumeratingWithState:state objects:stackbuf count:len];
+}
+
+
+
+#pragma mark -
+#pragma mark Lifecycle end
+
- (void) dealloc {
[source release];
[resources release];

0 comments on commit 6aa5271

Please sign in to comment.
Something went wrong with that request. Please try again.