Lines Matching full:state
226 // In either case, state->itemsPtr MUST be a valid array (non-nil). This sample takes approach #1, using stackbuf to store results.
227 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len
231 // Ensure that you never set state->state back to 0, or use another method to detect initialization
232 // (such as using one of the values of state->extra).
233 if (state->state == 0) {
234 // We are not tracking mutations, so we'll set state->mutationsPtr to point into one of our extra values,
237 // state->mutationsPtr MUST NOT be NULL.
238 state->mutationsPtr = &state->extra[0];
240 // Now we provide items, which we track with state->state, and determine if we have finished iterating.
241 if (state->state < self.count) {
242 // Set state->itemsPtr to the provided buffer.
243 // Alternate implementations may set state->itemsPtr to an internal C array of objects.
244 // state->itemsPtr MUST NOT be NULL.
245 state->itemsPtr = stackbuf;
248 while((state->state < self.count) && (cnt < len)) {
251 stackbuf[cnt++] = ptrBuffer[state->state++];
253 // state->state = ((cnt < len)? cnt : len);