Home | History | Annotate | Download | only in Framework

Lines Matching full:state

199 // In either case, state->itemsPtr MUST be a valid array (non-nil). This sample takes approach #1, using stackbuf to store results.
200 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len
204 // Ensure that you never set state->state back to 0, or use another method to detect initialization
205 // (such as using one of the values of state->extra).
206 if (state->state == 0) {
207 // We are not tracking mutations, so we'll set state->mutationsPtr to point into one of our extra values,
210 // state->mutationsPtr MUST NOT be NULL.
211 state->mutationsPtr = &state->extra[0];
214 // Now we provide items, which we track with state->state, and determine if we have finished iterating.
215 if (state->state < self.count) {
216 // Set state->itemsPtr to the provided buffer.
217 // Alternate implementations may set state->itemsPtr to an internal C array of objects.
218 // state->itemsPtr MUST NOT be NULL.
219 state->itemsPtr = stackbuf;
222 while((state->state < self.count) && (cnt < len)) {
225 stackbuf[cnt++] = ptrBuffer[state->state++];
227 // state->state = ((cnt < len)? cnt : len);