@@ -687,11 +687,11 @@ [_mapTable release]; [super dealloc]; } -- (void *)nextObject +- (void **)nextObject { OF_UNRECOGNIZED_SELECTOR } - (void)reset @@ -703,38 +703,38 @@ _position = 0; } @end @implementation OFMapTableKeyEnumerator -- (void *)nextObject +- (void **)nextObject { if (*_mutationsPtr != _mutations) @throw [OFEnumerationMutationException exceptionWithObject: _mapTable]; for (; _position < _capacity && (_buckets[_position] == NULL || _buckets[_position] == &deleted); _position++); if (_position < _capacity) - return _buckets[_position++]->key; + return &_buckets[_position++]->key; else return NULL; } @end @implementation OFMapTableObjectEnumerator -- (void *)nextObject +- (void **)nextObject { if (*_mutationsPtr != _mutations) @throw [OFEnumerationMutationException exceptionWithObject: _mapTable]; for (; _position < _capacity && (_buckets[_position] == NULL || _buckets[_position] == &deleted); _position++); if (_position < _capacity) - return _buckets[_position++]->object; + return &_buckets[_position++]->object; else return NULL; } @end @@ -758,20 +758,23 @@ [super dealloc]; } - (id)nextObject { - id ret; + void **objectPtr; @try { - ret = [_enumerator nextObject]; + objectPtr = [_enumerator nextObject]; + + if (objectPtr == NULL) + return nil; } @catch (OFEnumerationMutationException *e) { @throw [OFEnumerationMutationException exceptionWithObject: _object]; } - return ret; + return (id)*objectPtr; } - (void)reset { @try {