@@ -59,17 +59,17 @@ { return (object1 == object2); } @interface OFMapTable () -- (void)OF_setObject: (void *)object +- (void)of_setObject: (void *)object forKey: (void *)key hash: (uint32_t)hash; @end @interface OFMapTableEnumerator () -- (instancetype)OF_initWithMapTable: (OFMapTable *)mapTable +- (instancetype)of_initWithMapTable: (OFMapTable *)mapTable buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity mutationsPointer: (unsigned long *)mutationsPtr OF_METHOD_FAMILY(init); @end @@ -243,11 +243,11 @@ capacity: _capacity]; @try { for (uint32_t i = 0; i < _capacity; i++) if (_buckets[i] != NULL && _buckets[i] != &deleted) - [copy OF_setObject: _buckets[i]->object + [copy of_setObject: _buckets[i]->object forKey: _buckets[i]->key hash: OF_ROR(_buckets[i]->hash, _rotate)]; } @catch (id e) { [copy release]; @@ -295,11 +295,11 @@ } return NULL; } -- (void)OF_resizeForCount: (uint32_t)count +- (void)of_resizeForCount: (uint32_t)count { uint32_t fullness, capacity; struct of_map_table_bucket **buckets; if (count > UINT32_MAX / sizeof(*_buckets) || count > UINT32_MAX / 8) @@ -356,11 +356,11 @@ [self freeMemory: _buckets]; _buckets = buckets; _capacity = capacity; } -- (void)OF_setObject: (void *)object +- (void)of_setObject: (void *)object forKey: (void *)key hash: (uint32_t)hash { uint32_t i, last; void *old; @@ -395,11 +395,11 @@ /* Key not in map table */ if (i >= last || _buckets[i] == NULL || _buckets[i] == &deleted || !_keyFunctions.equal(_buckets[i]->key, key)) { struct of_map_table_bucket *bucket; - [self OF_resizeForCount: _count + 1]; + [self of_resizeForCount: _count + 1]; _mutations++; last = _capacity; for (i = hash & (_capacity - 1); i < last && @@ -447,11 +447,11 @@ } - (void)setObject: (void *)object forKey: (void *)key { - [self OF_setObject: object + [self of_setObject: object forKey: key hash: _keyFunctions.hash(key)]; } - (void)removeObjectForKey: (void *)key @@ -476,11 +476,11 @@ [self freeMemory: _buckets[i]]; _buckets[i] = &deleted; _count--; - [self OF_resizeForCount: _count]; + [self of_resizeForCount: _count]; return; } } @@ -501,11 +501,11 @@ [self freeMemory: _buckets[i]]; _buckets[i] = &deleted; _count--; _mutations++; - [self OF_resizeForCount: _count]; + [self of_resizeForCount: _count]; return; } } } @@ -574,20 +574,20 @@ } - (OFMapTableEnumerator *)keyEnumerator { return [[[OFMapTableKeyEnumerator alloc] - OF_initWithMapTable: self + of_initWithMapTable: self buckets: _buckets capacity: _capacity mutationsPointer: &_mutations] autorelease]; } - (OFMapTableEnumerator *)objectEnumerator { return [[[OFMapTableObjectEnumerator alloc] - OF_initWithMapTable: self + of_initWithMapTable: self buckets: _buckets capacity: _capacity mutationsPointer: &_mutations] autorelease]; } @@ -664,11 +664,11 @@ - init { OF_INVALID_INIT_METHOD } -- (instancetype)OF_initWithMapTable: (OFMapTable *)mapTable +- (instancetype)of_initWithMapTable: (OFMapTable *)mapTable buckets: (struct of_map_table_bucket **)buckets capacity: (uint32_t)capacity mutationsPointer: (unsigned long *)mutationsPtr { self = [super init];