Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -24,11 +24,11 @@ extern int getpagesize(void); @implementation OFArray + arrayWithItemSize: (size_t)is { - return [[[self alloc] initWithItemSize: is] autorelease]; + return [[[OFArray alloc] initWithItemSize: is] autorelease]; } + bigArrayWithItemSize: (size_t)is { return [[[OFBigArray alloc] initWithItemSize: is] autorelease]; Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -25,11 +25,11 @@ @implementation OFFile + fileWithPath: (const char*)path andMode: (const char*)mode { - return [[[self alloc] initWithPath: path + return [[[OFFile alloc] initWithPath: path andMode: mode] autorelease]; } + (void)changeModeOfFile: (const char*)path toMode: (mode_t)mode Index: src/OFHashes.m ================================================================== --- src/OFHashes.m +++ src/OFHashes.m @@ -115,11 +115,11 @@ } @implementation OFMD5Hash + md5Hash { - return [[[self alloc] init] autorelease]; + return [[[OFMD5Hash alloc] init] autorelease]; } - init { if ((self = [super init])) { @@ -358,11 +358,11 @@ } @implementation OFSHA1Hash + sha1Hash { - return [[[self alloc] init] autorelease]; + return [[[OFSHA1Hash alloc] init] autorelease]; } - init { if ((self = [super init])) { Index: src/OFList.m ================================================================== --- src/OFList.m +++ src/OFList.m @@ -14,11 +14,11 @@ #import "OFList.h" @implementation OFList + list { - return [[[self alloc] init] autorelease]; + return [[[OFList alloc] init] autorelease]; } - init { if ((self = [super init])) { Index: src/OFNumber.m ================================================================== --- src/OFNumber.m +++ src/OFNumber.m @@ -68,121 +68,121 @@ } @implementation OFNumber + numberWithChar: (char)char_ { - return [[[self alloc] initWithChar: char_] autorelease]; + return [[[OFNumber alloc] initWithChar: char_] autorelease]; } + numberWithShort: (short)short_ { - return [[[self alloc] initWithShort: short_] autorelease]; + return [[[OFNumber alloc] initWithShort: short_] autorelease]; } + numberWithInt: (int)int_ { - return [[[self alloc] initWithInt: int_] autorelease]; + return [[[OFNumber alloc] initWithInt: int_] autorelease]; } + numberWithLong: (long)long_ { - return [[[self alloc] initWithLong: long_] autorelease]; + return [[[OFNumber alloc] initWithLong: long_] autorelease]; } + numberWithUChar: (unsigned char)uchar { - return [[[self alloc] initWithUChar: uchar] autorelease]; + return [[[OFNumber alloc] initWithUChar: uchar] autorelease]; } + numberWithUShort: (unsigned short)ushort { - return [[[self alloc] initWithUShort: ushort] autorelease]; + return [[[OFNumber alloc] initWithUShort: ushort] autorelease]; } + numberWithUInt: (unsigned int)uint { - return [[[self alloc] initWithUInt: uint] autorelease]; + return [[[OFNumber alloc] initWithUInt: uint] autorelease]; } + numberWithULong: (unsigned long)ulong { - return [[[self alloc] initWithULong: ulong] autorelease]; + return [[[OFNumber alloc] initWithULong: ulong] autorelease]; } + numberWithInt8: (int8_t)int8 { - return [[[self alloc] initWithInt8: int8] autorelease]; + return [[[OFNumber alloc] initWithInt8: int8] autorelease]; } + numberWithInt16: (int16_t)int16 { - return [[[self alloc] initWithInt16: int16] autorelease]; + return [[[OFNumber alloc] initWithInt16: int16] autorelease]; } + numberWithInt32: (int32_t)int32 { - return [[[self alloc] initWithInt32: int32] autorelease]; + return [[[OFNumber alloc] initWithInt32: int32] autorelease]; } + numberWithInt64: (int64_t)int64 { - return [[[self alloc] initWithInt64: int64] autorelease]; + return [[[OFNumber alloc] initWithInt64: int64] autorelease]; } + numberWithUInt8: (uint8_t)uint8 { - return [[[self alloc] initWithUInt8: uint8] autorelease]; + return [[[OFNumber alloc] initWithUInt8: uint8] autorelease]; } + numberWithUInt16: (uint16_t)uint16 { - return [[[self alloc] initWithUInt16: uint16] autorelease]; + return [[[OFNumber alloc] initWithUInt16: uint16] autorelease]; } + numberWithUInt32: (uint32_t)uint32 { - return [[[self alloc] initWithUInt32: uint32] autorelease]; + return [[[OFNumber alloc] initWithUInt32: uint32] autorelease]; } + numberWithUInt64: (uint64_t)uint64 { - return [[[self alloc] initWithUInt64: uint64] autorelease]; + return [[[OFNumber alloc] initWithUInt64: uint64] autorelease]; } + numberWithSize: (size_t)size { - return [[[self alloc] initWithSize: size] autorelease]; + return [[[OFNumber alloc] initWithSize: size] autorelease]; } + numberWithSSize: (ssize_t)ssize { - return [[[self alloc] initWithSSize: ssize] autorelease]; + return [[[OFNumber alloc] initWithSSize: ssize] autorelease]; } + numberWithPtrDiff: (ptrdiff_t)ptrdiff { - return [[[self alloc] initWithPtrDiff: ptrdiff] autorelease]; + return [[[OFNumber alloc] initWithPtrDiff: ptrdiff] autorelease]; } + numberWithIntPtr: (intptr_t)intptr { - return [[[self alloc] initWithIntPtr: intptr] autorelease]; + return [[[OFNumber alloc] initWithIntPtr: intptr] autorelease]; } + numberWithFloat: (float)float_ { - return [[[self alloc] initWithFloat: float_] autorelease]; + return [[[OFNumber alloc] initWithFloat: float_] autorelease]; } + numberWithDouble: (double)double_ { - return [[[self alloc] initWithDouble: double_] autorelease]; + return [[[OFNumber alloc] initWithDouble: double_] autorelease]; } + numberWithLongDouble: (long double)longdouble { - return [[[self alloc] initWithLongDouble: longdouble] autorelease]; + return [[[OFNumber alloc] initWithLongDouble: longdouble] autorelease]; } - initWithChar: (char)char_ { if ((self = [super init])) { Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -103,35 +103,35 @@ } @implementation OFString + string { - return [[[self alloc] init] autorelease]; + return [[[OFString alloc] init] autorelease]; } + stringWithCString: (const char*)str { - return [[[self alloc] initWithCString: str] autorelease]; + return [[[OFString alloc] initWithCString: str] autorelease]; } + stringWithFormat: (const char*)fmt, ... { id ret; va_list args; va_start(args, fmt); - ret = [[[self alloc] initWithFormat: fmt + ret = [[[OFString alloc] initWithFormat: fmt andArguments: args] autorelease]; va_end(args); return ret; } + stringWithFormat: (const char*)fmt andArguments: (va_list)args { - return [[[self alloc] initWithFormat: fmt + return [[[OFString alloc] initWithFormat: fmt andArguments: args] autorelease]; } - init { Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -25,11 +25,11 @@ #endif @implementation OFTCPSocket + tcpSocket { - return [[[self alloc] init] autorelease]; + return [[[OFTCPSocket alloc] init] autorelease]; } #ifdef _WIN32 + (void)initialize {