@@ -221,31 +221,31 @@ [objects[i] release]; [_array removeAllItems]; } -- (void)removeObjectsInRange: (of_range_t)range +- (void)removeObjectsInRange: (OFRange)range { id const *objects = _array.items; size_t count = _array.count; id *copy; if (range.length > SIZE_MAX - range.location || range.location >= count || range.length > count - range.location) @throw [OFOutOfRangeException exception]; - copy = of_alloc(range.length, sizeof(*copy)); + copy = OFAllocMemory(range.length, sizeof(*copy)); memcpy(copy, objects + range.location, range.length * sizeof(id)); @try { [_array removeItemsInRange: range]; _mutations++; for (size_t i = 0; i < range.length; i++) [copy[i] release]; } @finally { - free(copy); + OFFreeMemory(copy); } } - (void)removeLastObject { @@ -291,11 +291,11 @@ objects[i] = objects[j]; objects[j] = tmp; } } -- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t *)state +- (int)countByEnumeratingWithState: (OFFastEnumerationState *)state objects: (id *)objects count: (int)count_ { size_t count = _array.count; @@ -328,11 +328,11 @@ initWithArray: self mutationsPtr: &_mutations] autorelease]; } #ifdef OF_HAVE_BLOCKS -- (void)enumerateObjectsUsingBlock: (of_array_enumeration_block_t)block +- (void)enumerateObjectsUsingBlock: (OFArrayEnumerationBlock)block { id const *objects = _array.items; size_t count = _array.count; bool stop = false; unsigned long mutations = _mutations; @@ -344,11 +344,11 @@ block(objects[i], i, &stop); } } -- (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block +- (void)replaceObjectsUsingBlock: (OFArrayReplaceBlock)block { id *objects = _array.mutableItems; size_t count = _array.count; unsigned long mutations = _mutations;