Revision: 6364
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6364&view=rev
Author:   hofman
Date:     2010-03-23 11:21:43 +0000 (Tue, 23 Mar 2010)

Log Message:
-----------
implement nsfastenumeration for array subclass

Modified Paths:
--------------
    trunk/SKIBArray.m

Modified: trunk/SKIBArray.m
===================================================================
--- trunk/SKIBArray.m   2010-03-22 18:10:31 UTC (rev 6363)
+++ trunk/SKIBArray.m   2010-03-23 11:21:43 UTC (rev 6364)
@@ -54,4 +54,16 @@
     return object[anIndex];
 }
 
+- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state 
objects:(id *)stackbuf count:(NSUInteger)len {
+    static const unsigned long const_mu = 1;
+    id object[] = {object1, object2, object3, object4, object5, object6, 
object7, object8, object9};
+    NSUInteger i = 0, current = state->state;
+    for (i = 0, current = state->state; current < 9 && i < len && 
object[current] != nil; i++, current++)
+        stackbuf[i] = object[current];
+    state->state = current;
+    state->itemsPtr = stackbuf;
+       state->mutationsPtr = (unsigned long *)&const_mu;
+    return i;
+}
+
 @end


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to