@@ -231,21 +231,22 @@ { } - (void)dealloc { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } @end @implementation OFMutableString + (void)initialize { if (self == [OFMutableString class]) - placeholder.isa = [OFMutableString_placeholder class]; + object_setClass((id)&placeholder, + [OFMutableString_placeholder class]); } + alloc { if (self == [OFMutableString class]) @@ -298,11 +299,11 @@ } - (void)setCharacter: (of_unichar_t)character atIndex: (size_t)index { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (void)appendUTF8String: (const char*)UTF8String { @@ -369,16 +370,18 @@ { char *UTF8String; int UTF8StringLength; if (format == nil) - @throw [OFInvalidArgumentException exceptionWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException + exceptionWithClass: [self class] + selector: _cmd]; if ((UTF8StringLength = of_vasprintf(&UTF8String, [format UTF8String], arguments)) == -1) - @throw [OFInvalidFormatException exceptionWithClass: isa]; + @throw [OFInvalidFormatException + exceptionWithClass: [self class]]; @try { [self appendUTF8String: UTF8String withLength: UTF8StringLength]; } @finally { @@ -430,17 +433,17 @@ } - (void)insertString: (OFString*)string atIndex: (size_t)index { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (void)deleteCharactersInRange: (of_range_t)range { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - (void)replaceCharactersInRange: (of_range_t)range withString: (OFString*)replacement @@ -468,11 +471,11 @@ size_t searchLength = [string length]; size_t replacementLength = [replacement length]; size_t i; if (range.start + range.length > [self length]) - @throw [OFOutOfRangeException exceptionWithClass: isa]; + @throw [OFOutOfRangeException exceptionWithClass: [self class]]; if (searchLength > range.length) { [pool release]; return; }