Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -77,18 +77,10 @@ * \param array An array * \return A new autoreleased OFArray */ + arrayWithArray: (OFArray*)array; -/** - * \brief Creates a new OFArray with the objects from the specified C array. - * - * \param objects A C array of objects, terminated with nil - * \return A new autoreleased OFArray - */ -+ arrayWithCArray: (id*)objects; - /** * \brief Creates a new OFArray with the objects from the specified C array of * the specified length. * * \param objects A C array of objects @@ -130,18 +122,10 @@ * \param array An array * \return An initialized OFArray */ - initWithArray: (OFArray*)array; -/** - * \brief Initializes an OFArray with the objects from the specified C array. - * - * \param objects A C array of objects, terminated with nil - * \return An initialized OFArray - */ -- initWithCArray: (id*)objects; - /** * \brief Initializes an OFArray with the objects from the specified C array of * the specified length. * * \param objects A C array of objects Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -73,15 +73,10 @@ - initWithArray: (OFArray*)array { return (id)[[OFArray_adjacent alloc] initWithArray: array]; } -- initWithCArray: (id*)objects -{ - return (id)[[OFArray_adjacent alloc] initWithCArray: objects]; -} - - initWithCArray: (id*)objects length: (size_t)length { return (id)[[OFArray_adjacent alloc] initWithCArray: objects length: length]; @@ -155,15 +150,10 @@ + arrayWithArray: (OFArray*)array { return [[[self alloc] initWithArray: array] autorelease]; } -+ arrayWithCArray: (id*)objects -{ - return [[[self alloc] initWithCArray: objects] autorelease]; -} - + arrayWithCArray: (id*)objects length: (size_t)length { return [[[self alloc] initWithCArray: objects length: length] autorelease]; @@ -208,18 +198,10 @@ selector: _cmd]; } - initWithArray: (OFArray*)array { - Class c = isa; - [self release]; - @throw [OFNotImplementedException exceptionWithClass: c - selector: _cmd]; -} - -- initWithCArray: (id*)objects -{ Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } Index: src/OFArray_adjacent.m ================================================================== --- src/OFArray_adjacent.m +++ src/OFArray_adjacent.m @@ -112,38 +112,10 @@ /* Prevent double-release of objects */ [array release]; array = nil; - [self release]; - @throw e; - } - - return self; -} - -- initWithCArray: (id*)objects -{ - self = [self init]; - - @try { - id *object; - size_t count = 0; - - for (object = objects; *object != nil; object++) { - [*object retain]; - count++; - } - - [array addNItems: count - fromCArray: objects]; - } @catch (id e) { - id *object; - - for (object = objects; *object != nil; object++) - [*object release]; - [self release]; @throw e; } return self; Index: src/OFMutableArray.m ================================================================== --- src/OFMutableArray.m +++ src/OFMutableArray.m @@ -106,15 +106,10 @@ - initWithArray: (OFArray*)array { return (id)[[OFMutableArray_adjacent alloc] initWithArray: array]; } -- initWithCArray: (id*)objects -{ - return (id)[[OFMutableArray_adjacent alloc] initWithCArray: objects]; -} - - initWithCArray: (id*)objects length: (size_t)length { return (id)[[OFMutableArray_adjacent alloc] initWithCArray: objects length: length];