Index: src/OFEnumerator.h ================================================================== --- src/OFEnumerator.h +++ src/OFEnumerator.h @@ -66,14 +66,11 @@ /// Pointer to a C array of objects to return id *itemsPtr; /// Arbitrary state information to detect mutations unsigned long *mutationsPtr; /// Additional arbitrary state information - union { - unsigned long longs[5]; - void *pointers[2]; - } extra; + unsigned long extra[5]; } of_fast_enumeration_state_t; #endif /** * \brief A protocol for fast enumeration. Index: src/OFList.m ================================================================== --- src/OFList.m +++ src/OFList.m @@ -392,33 +392,29 @@ - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count_ { - of_list_object_t *listObject = state->extra.pointers[0]; + of_list_object_t **listObject = (of_list_object_t**)&state->extra[0]; int i; state->itemsPtr = objects; state->mutationsPtr = &mutations; if (state->state == 0) { - listObject = firstListObject; + *listObject = firstListObject; state->state = 1; } for (i = 0; i < count_; i++) { - if (listObject == NULL) { - state->extra.pointers[0] = NULL; + if (*listObject == NULL) return i; - } - objects[i] = listObject->object; - listObject = listObject->next; + objects[i] = (*listObject)->object; + *listObject = (*listObject)->next; } - state->extra.pointers[0] = listObject; - return count_; } - (OFEnumerator*)objectEnumerator {