Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -140,25 +140,8 @@ * * \param separator The string with which the objects should be joined * \return A string containing all objects joined by the separator */ - (OFString*)componentsJoinedByString: (OFString*)separator; - -- addObject: (OFObject*)obj; -- addObject: (OFObject*)obj - atIndex: (size_t)index; -- replaceObject: (OFObject*)old - withObject: (OFObject*)new; -- replaceObjectAtIndex: (size_t)index - withObject: (OFObject*)obj; -- replaceObjectIdenticalTo: (OFObject*)old - withObject: (OFObject*)new; -- removeObject: (OFObject*)obj; -- removeObjectIdenticalTo: (OFObject*)obj; -- removeObjectAtIndex: (size_t)index; -- removeNObjects: (size_t)nobjects; -- removeNObjects: (size_t)nobjects - atIndex: (size_t)index; @end #import "OFMutableArray.h" -#import "OFString.h" Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -310,71 +310,6 @@ [array release]; [super dealloc]; } - -- addObject: (OFObject*)obj -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- addObject: (OFObject*)obj - atIndex: (size_t)index -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- replaceObject: (OFObject*)old - withObject: (OFObject*)new -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- replaceObjectAtIndex: (size_t)index - withObject: (OFObject*)obj -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- replaceObjectIdenticalTo: (OFObject*)old - withObject: (OFObject*)new -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeObject: (OFObject*)obj -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeObjectIdenticalTo: (OFObject*)obj -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeObjectAtIndex: (size_t)index -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeNObjects: (size_t)nobjects -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeNObjects: (size_t)nobjects - atIndex: (size_t)index -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} @end Index: src/OFAutoreleasePool.h ================================================================== --- src/OFAutoreleasePool.h +++ src/OFAutoreleasePool.h @@ -19,11 +19,11 @@ * * Every thread has its own stack of autorelease pools. */ @interface OFAutoreleasePool: OFObject { - OFArray *objects; + OFMutableArray *objects; OFAutoreleasePool *next, *prev; } /** * Adds an object to the autorelease pool at the top of the thread-specific Index: src/OFDictionary.h ================================================================== --- src/OFDictionary.h +++ src/OFDictionary.h @@ -142,13 +142,9 @@ /** * \return The number of objects in the dictionary */ - (size_t)count; - -- setObject: (OFObject*)obj - forKey: (OFObject *)key; -- removeObjectForKey: (OFObject*)key; @end #import "OFEnumerator.h" #import "OFMutableDictionary.h" Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -543,23 +543,10 @@ } [super dealloc]; } -- setObject: (OFObject*)obj - forKey: (OFObject *)key -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeObjectForKey: (OFObject*)key -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - - (uint32_t)hash { size_t i; uint32_t hash; Index: src/OFPlugin.m ================================================================== --- src/OFPlugin.m +++ src/OFPlugin.m @@ -30,11 +30,11 @@ @implementation OFPlugin + pluginFromFile: (OFString*)path { OFAutoreleasePool *pool; - OFString *file; + OFMutableString *file; of_plugin_handle_t handle; OFPlugin *(*init_plugin)(); OFPlugin *plugin; pool = [[OFAutoreleasePool alloc] init]; Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -290,35 +290,13 @@ * OFInvalidEncoding exception if the string contains any non-number characters. * * \return An OFNumber */ - (intmax_t)hexadecimalValueAsInteger; - -- setToCString: (const char*)str; -- appendCString: (const char*)str; -- appendCString: (const char*)str - withLength: (size_t)len; -- appendCStringWithoutUTF8Checking: (const char*)str; -- appendCStringWithoutUTF8Checking: (const char*)str - length: (size_t)len; -- appendString: (OFString*)str; -- appendWithFormat: (OFString*)fmt, ...; -- appendWithFormat: (OFString*)fmt - arguments: (va_list)args; -- reverse; -- upper; -- lower; -- removeCharactersFromIndex: (size_t)start - toIndex: (size_t)end; -- replaceOccurrencesOfString: (OFString*)str - withString: (OFString*)repl; -- removeLeadingWhitespaces; -- removeTrailingWhitespaces; -- removeLeadingAndTrailingWhitespaces; @end #import "OFConstString.h" #import "OFMutableString.h" #import "OFHashes.h" #import "OFURLEncoding.h" #import "OFXMLElement.h" #import "OFXMLParser.h" Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -775,11 +775,11 @@ } - (OFArray*)splitWithDelimiter: (OFString*)delimiter { OFAutoreleasePool *pool; - OFArray *array; + OFMutableArray *array; const char *delim = [delimiter cString]; size_t delim_len = [delimiter cStringLength]; size_t i, last; array = [OFMutableArray array]; @@ -869,107 +869,6 @@ num = newnum; } return num; } - -- setToCString: (const char*)str -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- appendCString: (const char*)str -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- appendCString: (const char*)str - withLength: (size_t)len -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- appendCStringWithoutUTF8Checking: (const char*)str -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- appendCStringWithoutUTF8Checking: (const char*)str - length: (size_t)len -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- appendString: (OFString*)str -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- appendWithFormat: (OFString*)fmt, ... -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- appendWithFormat: (OFString*)fmt - arguments: (va_list)args -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- reverse -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- upper -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- lower -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeCharactersFromIndex: (size_t)start - toIndex: (size_t)end -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- replaceOccurrencesOfString: (OFString*)str - withString: (OFString*)repl -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeLeadingWhitespaces -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeTrailingWhitespaces -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} - -- removeLeadingAndTrailingWhitespaces -{ - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; -} @end Index: src/OFXMLElement.h ================================================================== --- src/OFXMLElement.h +++ src/OFXMLElement.h @@ -79,13 +79,13 @@ * modified and converted back to XML again. */ @interface OFXMLElement: OFObject { OFString *name; - OFArray *attrs; + OFMutableArray *attrs; OFString *stringval; - OFArray *children; + OFMutableArray *children; } /** * \param name The name for the element * \return A new autorelease OFXMLElement with the specified element name Index: src/OFXMLParser.h ================================================================== --- src/OFXMLParser.h +++ src/OFXMLParser.h @@ -12,10 +12,11 @@ #import "OFObject.h" #import "OFString.h" extern int _OFXMLParser_reference; +@class OFMutableString; @class OFXMLParser; /** * A protocol that needs to be implemented by delegates for OFXMLParser. */ @@ -118,19 +119,19 @@ OF_XMLPARSER_IN_COMMENT_1, OF_XMLPARSER_IN_COMMENT_2, OF_XMLPARSER_IN_COMMENT_3, OF_XMLPARSER_IN_COMMENT_4 } state; - OFString *cache; + OFMutableString *cache; OFString *name; OFString *prefix; OFString *ns; - OFArray *attrs; + OFMutableArray *attrs; OFString *attr_name; OFString *attr_prefix; char delim; - OFArray *previous; + OFMutableArray *previous; } /** * \return A new, autoreleased OFXMLParser */ Index: src/OFXMLParser.m ================================================================== --- src/OFXMLParser.m +++ src/OFXMLParser.m @@ -19,11 +19,12 @@ #import "OFMacros.h" int _OFXMLParser_reference; static OF_INLINE OFString* -transform_string(OFString *cache, OFObject *handler) +transform_string(OFMutableString *cache, + OFObject *handler) { /* TODO: Support for xml:space */ [cache removeLeadingAndTrailingWhitespaces]; return [cache stringByXMLUnescapingWithHandler: handler]; @@ -505,16 +506,16 @@ - stringByXMLUnescapingWithHandler: (OFObject *)h { size_t i, last; BOOL in_entity; - OFString *ret; + OFMutableString *ret; last = 0; in_entity = NO; ret = [OFMutableString string]; - ret->is_utf8 = is_utf8; + ((OFString*)ret)->is_utf8 = is_utf8; for (i = 0; i < length; i++) { if (!in_entity && string[i] == '&') { [ret appendCStringWithoutUTF8Checking: string + last length: i - last]; Index: tests/OFArray.m ================================================================== --- tests/OFArray.m +++ tests/OFArray.m @@ -28,11 +28,11 @@ void array_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; - OFArray *a[3]; + OFMutableArray *a[3]; TEST(@"+[array]", (a[0] = [OFMutableArray array])) TEST(@"+[arrayWithObjects:]", (a[1] = [OFArray arrayWithObjects: @"Foo", @"Bar", @"Baz", nil])) Index: tests/OFDictionary.m ================================================================== --- tests/OFDictionary.m +++ tests/OFDictionary.m @@ -30,11 +30,11 @@ void dictionary_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; - OFDictionary *dict = [OFMutableDictionary dictionary], *dict2; + OFMutableDictionary *dict = [OFMutableDictionary dictionary], *dict2; OFEnumerator *enumerator; of_enumerator_pair_t pair[3]; OFArray *akeys, *avalues; [dict setObject: values[0] Index: tests/OFString.m ================================================================== --- tests/OFString.m +++ tests/OFString.m @@ -39,11 +39,11 @@ void string_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; - OFString *s[3]; + OFMutableString *s[3]; OFArray *a; int i; EntityHandler *h; s[0] = [OFMutableString stringWithString: @"täs€"];