@@ -57,17 +57,17 @@ equal(void *object1, void *object2) { return [(id)object1 isEqual: (id)object2]; } -static const of_map_table_functions_t keyFunctions = { +static const OFMapTableFunctions keyFunctions = { .retain = copy, .release = release, .hash = hash, .equal = equal }; -static const of_map_table_functions_t objectFunctions = { +static const OFMapTableFunctions objectFunctions = { .retain = retain, .release = release, .hash = hash, .equal = equal }; @@ -241,13 +241,13 @@ OFArray *keys, *objects; OFEnumerator *keyEnumerator, *objectEnumerator; OFXMLElement *keyElement, *objectElement; keys = [element elementsForName: @"key" - namespace: OF_SERIALIZATION_NS]; + namespace: OFSerializationNS]; objects = [element elementsForName: @"object" - namespace: OF_SERIALIZATION_NS]; + namespace: OFSerializationNS]; if (keys.count != objects.count) @throw [OFInvalidFormatException exception]; _mapTable = [[OFMapTable alloc] @@ -261,13 +261,13 @@ (objectElement = [objectEnumerator nextObject]) != nil) { void *pool2 = objc_autoreleasePoolPush(); OFXMLElement *key, *object; key = [keyElement elementsForNamespace: - OF_SERIALIZATION_NS].firstObject; + OFSerializationNS].firstObject; object = [objectElement elementsForNamespace: - OF_SERIALIZATION_NS].firstObject; + OFSerializationNS].firstObject; if (key == nil || object == nil) @throw [OFInvalidFormatException exception]; [_mapTable setObject: object.objectByDeserializing @@ -333,11 +333,11 @@ OFArray *ret; id *keys; size_t count; count = _mapTable.count; - keys = of_alloc(count, sizeof(*keys)); + keys = OFAllocMemory(count, sizeof(*keys)); @try { void *pool = objc_autoreleasePoolPush(); OFMapTableEnumerator *enumerator; void **keyPtr; @@ -353,11 +353,11 @@ objc_autoreleasePoolPop(pool); ret = [OFArray arrayWithObjects: keys count: count]; } @finally { - free(keys); + OFFreeMemory(keys); } return ret; } @@ -366,11 +366,11 @@ OFArray *ret; id *objects; size_t count; count = _mapTable.count; - objects = of_alloc(count, sizeof(*objects)); + objects = OFAllocMemory(count, sizeof(*objects)); @try { void *pool = objc_autoreleasePoolPush(); OFMapTableEnumerator *enumerator; void **objectPtr; @@ -386,11 +386,11 @@ objc_autoreleasePoolPop(pool); ret = [OFArray arrayWithObjects: objects count: count]; } @finally { - free(objects); + OFFreeMemory(objects); } return ret; } @@ -406,22 +406,21 @@ return [[[OFMapTableEnumeratorWrapper alloc] initWithEnumerator: [_mapTable objectEnumerator] object: self] autorelease]; } -- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t *)state +- (int)countByEnumeratingWithState: (OFFastEnumerationState *)state objects: (id *)objects count: (int)count { return [_mapTable countByEnumeratingWithState: state objects: objects count: count]; } #ifdef OF_HAVE_BLOCKS -- (void)enumerateKeysAndObjectsUsingBlock: - (of_dictionary_enumeration_block_t)block +- (void)enumerateKeysAndObjectsUsingBlock: (OFDictionaryEnumerationBlock)block { @try { [_mapTable enumerateKeysAndObjectsUsingBlock: ^ (void *key, void *object, bool *stop) { block(key, object, stop);