@@ -46,21 +46,21 @@ size_t fullness = newCount * 4 / size; struct of_dictionary_hashtable_bucket **newData; uint32_t i, newSize; if (newCount > UINT32_MAX) - @throw [OFOutOfRangeException exceptionWithClass: isa]; + @throw [OFOutOfRangeException exceptionWithClass: [self class]]; if (fullness >= 3) newSize = size << 1; else if (fullness <= 1) newSize = size >> 1; else return; if (newSize == 0) - @throw [OFOutOfRangeException exceptionWithClass: isa]; + @throw [OFOutOfRangeException exceptionWithClass: [self class]]; newData = [self allocMemoryWithSize: sizeof(*newData) count: newSize]; for (i = 0; i < newSize; i++) @@ -84,11 +84,11 @@ } if (j >= last) { [self freeMemory: newData]; @throw [OFOutOfRangeException - exceptionWithClass: isa]; + exceptionWithClass: [self class]]; } newData[j] = data[i]; } } @@ -104,12 +104,13 @@ { uint32_t i, hash, last; id old; if (key == nil || object == nil) - @throw [OFInvalidArgumentException exceptionWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException + exceptionWithClass: [self class] + selector: _cmd]; hash = [key hash]; last = size; for (i = hash & (size - 1); i < last && data[i] != NULL; i++) { @@ -153,11 +154,12 @@ for (i = 0; i < last && data[i] != NULL && data[i] != DELETED; i++); } if (i >= last) - @throw [OFOutOfRangeException exceptionWithClass: isa]; + @throw [OFOutOfRangeException + exceptionWithClass: [self class]]; bucket = [self allocMemoryWithSize: sizeof(*bucket)]; if (copyKey) { @try { @@ -194,12 +196,13 @@ - (void)removeObjectForKey: (id)key { uint32_t i, hash, last; if (key == nil) - @throw [OFInvalidArgumentException exceptionWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException + exceptionWithClass: [self class] + selector: _cmd]; hash = [key hash]; last = size; for (i = hash & (size - 1); i < last && data[i] != NULL; i++) { @@ -289,11 +292,11 @@ unsigned long mutations2 = mutations; for (i = 0; i < size && !stop; i++) { if (mutations != mutations2) @throw [OFEnumerationMutationException - exceptionWithClass: isa + exceptionWithClass: [self class] object: self]; if (data[i] != NULL && data[i] != DELETED) block(data[i]->key, data[i]->object, &stop); } @@ -306,19 +309,19 @@ unsigned long mutations2 = mutations; for (i = 0; i < size && !stop; i++) { if (mutations != mutations2) @throw [OFEnumerationMutationException - exceptionWithClass: isa + exceptionWithClass: [self class] object: self]; if (data[i] != NULL && data[i] != DELETED) { id new = block(data[i]->key, data[i]->object, &stop); if (new == nil) @throw [OFInvalidArgumentException - exceptionWithClass: isa + exceptionWithClass: [self class] selector: _cmd]; [new retain]; [data[i]->object release]; data[i]->object = new; @@ -327,8 +330,8 @@ } #endif - (void)makeImmutable { - isa = [OFDictionary_hashtable class]; + object_setClass(self, [OFDictionary_hashtable class]); } @end