Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -61,11 +61,11 @@ } - (void*)item: (size_t)item { if (item >= items) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; return data + item * itemsize; } - (void*)last @@ -74,11 +74,11 @@ } - add: (void*)item { if (SIZE_MAX - items < 1 || items + 1 > SIZE_MAX / itemsize) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; data = [self resizeMem: data toNItems: items + 1 ofSize: itemsize]; @@ -89,11 +89,11 @@ - addNItems: (size_t)nitems fromCArray: (void*)carray { if (nitems > SIZE_MAX - items || items + nitems > SIZE_MAX / itemsize) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; data = [self resizeMem: data toNItems: items + nitems ofSize: itemsize]; @@ -104,11 +104,11 @@ } - removeNItems: (size_t)nitems { if (nitems > items) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; data = [self resizeMem: data toNItems: items - nitems ofSize: itemsize]; @@ -142,14 +142,14 @@ - (int)compare: (id)obj { int ret; if (![obj isKindOf: [OFArray class]]) - @throw [OFInvalidArgumentException newWithClass: [self class] + @throw [OFInvalidArgumentException newWithClass: isa andSelector: _cmd]; if ([obj itemsize] != itemsize) - @throw [OFInvalidArgumentException newWithClass: [self class] + @throw [OFInvalidArgumentException newWithClass: isa andSelector: _cmd]; if ([obj items] == items) return memcmp(data, [obj data], items * itemsize); @@ -195,11 +195,11 @@ - add: (void*)item { size_t nsize; if (SIZE_MAX - items < 1 || items + 1 > SIZE_MAX / itemsize) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; nsize = ((items + 1) * itemsize + lastpagebyte) & ~lastpagebyte; if (size != nsize) data = [self resizeMem: data @@ -215,11 +215,11 @@ fromCArray: (void*)carray { size_t nsize; if (nitems > SIZE_MAX - items || items + nitems > SIZE_MAX / itemsize) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; nsize = ((items + nitems) * itemsize + lastpagebyte) & ~lastpagebyte; if (size != nsize) data = [self resizeMem: data @@ -235,11 +235,11 @@ - removeNItems: (size_t)nitems { size_t nsize; if (nitems > items) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; nsize = ((items - nitems) * itemsize + lastpagebyte) & ~lastpagebyte; if (size != nsize) data = [self resizeMem: data Index: src/OFConstString.m ================================================================== --- src/OFConstString.m +++ src/OFConstString.m @@ -56,11 +56,11 @@ - (int)compare: (id)obj { if (![obj isKindOf: [OFString class]] && ![obj isKindOf: [OFConstString class]]) - @throw [OFInvalidArgumentException newWithClass: [self class]]; + @throw [OFInvalidArgumentException newWithClass: isa]; return strcmp(string, [obj cString]); } - (uint32_t)hash Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -47,11 +47,11 @@ - initWithHashSize: (int)hashsize { if ((self = [super init])) { if (hashsize < 8 || hashsize > 31) { - Class c = [self class]; + Class c = isa; [self free]; @throw [OFInvalidArgumentException newWithClass: c andSelector: _cmd]; } Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -82,11 +82,11 @@ { Class c; if ((self = [super init])) { if ((fp = fopen(path, mode)) == NULL) { - c = [self class]; + c = isa; [super free]; @throw [OFOpenFileFailedException newWithClass: c andPath: path andMode: mode]; } @@ -111,11 +111,11 @@ intoBuffer: (char*)buf { size_t ret; if ((ret = fread(buf, size, nitems, fp)) == 0 && !feof(fp)) - @throw [OFReadFailedException newWithClass: [self class] + @throw [OFReadFailedException newWithClass: isa andSize: size andNItems: nitems]; return ret; } @@ -134,11 +134,11 @@ { size_t ret; if ((ret = fwrite(buf, size, nitems, fp)) == 0 && size != 0 && nitems != 0) - @throw [OFWriteFailedException newWithClass: [self class] + @throw [OFWriteFailedException newWithClass: isa andSize: size andNItems: nitems]; return ret; } Index: src/OFNumber.m ================================================================== --- src/OFNumber.m +++ src/OFNumber.m @@ -12,67 +12,65 @@ #import "config.h" #import "OFNumber.h" #import "OFExceptions.h" -#define RETURN_AS(t) \ - switch (type) { \ - case OF_NUMBER_CHAR: \ - return (t)value.char_; \ - case OF_NUMBER_SHORT: \ - return (t)value.short_; \ - case OF_NUMBER_INT: \ - return (t)value.int_; \ - case OF_NUMBER_LONG: \ - return (t)value.long_; \ - case OF_NUMBER_UCHAR: \ - return (t)value.uchar; \ - case OF_NUMBER_USHORT: \ - return (t)value.ushort; \ - case OF_NUMBER_UINT: \ - return (t)value.uint; \ - case OF_NUMBER_ULONG: \ - return (t)value.ulong; \ - case OF_NUMBER_INT8: \ - return (t)value.int8; \ - case OF_NUMBER_INT16: \ - return (t)value.int16; \ - case OF_NUMBER_INT32: \ - return (t)value.int32; \ - case OF_NUMBER_INT64: \ - return (t)value.int64; \ - case OF_NUMBER_UINT8: \ - return (t)value.uint8; \ - case OF_NUMBER_UINT16: \ - return (t)value.uint16; \ - case OF_NUMBER_UINT32: \ - return (t)value.uint32; \ - case OF_NUMBER_UINT64: \ - return (t)value.uint64; \ - case OF_NUMBER_SIZE: \ - return (t)value.size; \ - case OF_NUMBER_SSIZE: \ - return (t)value.ssize; \ - case OF_NUMBER_INTMAX: \ - return (t)value.intmax; \ - case OF_NUMBER_UINTMAX: \ - return (t)value.uintmax; \ - case OF_NUMBER_PTRDIFF: \ - return (t)value.ptrdiff; \ - case OF_NUMBER_INTPTR: \ - return (t)value.intptr; \ - case OF_NUMBER_FLOAT: \ - return (t)value.float_; \ - case OF_NUMBER_DOUBLE: \ - return (t)value.double_; \ - case OF_NUMBER_LONG_DOUBLE: \ - return (t)value.longdouble; \ - default: \ - @throw [OFInvalidFormatException newWithClass: [self class]]; \ - \ - /* Make gcc happy */ \ - return 0; \ +#define RETURN_AS(t) \ + switch (type) { \ + case OF_NUMBER_CHAR: \ + return (t)value.char_; \ + case OF_NUMBER_SHORT: \ + return (t)value.short_; \ + case OF_NUMBER_INT: \ + return (t)value.int_; \ + case OF_NUMBER_LONG: \ + return (t)value.long_; \ + case OF_NUMBER_UCHAR: \ + return (t)value.uchar; \ + case OF_NUMBER_USHORT: \ + return (t)value.ushort; \ + case OF_NUMBER_UINT: \ + return (t)value.uint; \ + case OF_NUMBER_ULONG: \ + return (t)value.ulong; \ + case OF_NUMBER_INT8: \ + return (t)value.int8; \ + case OF_NUMBER_INT16: \ + return (t)value.int16; \ + case OF_NUMBER_INT32: \ + return (t)value.int32; \ + case OF_NUMBER_INT64: \ + return (t)value.int64; \ + case OF_NUMBER_UINT8: \ + return (t)value.uint8; \ + case OF_NUMBER_UINT16: \ + return (t)value.uint16; \ + case OF_NUMBER_UINT32: \ + return (t)value.uint32; \ + case OF_NUMBER_UINT64: \ + return (t)value.uint64; \ + case OF_NUMBER_SIZE: \ + return (t)value.size; \ + case OF_NUMBER_SSIZE: \ + return (t)value.ssize; \ + case OF_NUMBER_INTMAX: \ + return (t)value.intmax; \ + case OF_NUMBER_UINTMAX: \ + return (t)value.uintmax; \ + case OF_NUMBER_PTRDIFF: \ + return (t)value.ptrdiff; \ + case OF_NUMBER_INTPTR: \ + return (t)value.intptr; \ + case OF_NUMBER_FLOAT: \ + return (t)value.float_; \ + case OF_NUMBER_DOUBLE: \ + return (t)value.double_; \ + case OF_NUMBER_LONG_DOUBLE: \ + return (t)value.longdouble; \ + default: \ + @throw [OFInvalidFormatException newWithClass: isa]; \ + return 0; /* Make gcc happy */ \ } @implementation OFNumber + numberWithChar: (char)char_ { @@ -612,15 +610,15 @@ case OF_NUMBER_FLOAT: case OF_NUMBER_DOUBLE: case OF_NUMBER_LONG_DOUBLE: return ([obj asLongDouble] == [self asLongDouble] ? YES : NO); default: - @throw [OFInvalidArgumentException newWithClass: [self class] + @throw [OFInvalidArgumentException newWithClass: isa andSelector: _cmd]; } } - (uint32_t)hash { return [self asUInt32]; } @end Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -200,15 +200,15 @@ memchunks_size = PRE_IVAR->memchunks_size + 1; if (SIZE_MAX - PRE_IVAR->memchunks_size < 1 || memchunks_size > SIZE_MAX / sizeof(void*)) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; if ((memchunks = realloc(PRE_IVAR->memchunks, memchunks_size * sizeof(void*))) == NULL) - @throw [OFNoMemException newWithClass: [self class] + @throw [OFNoMemException newWithClass: isa andSize: memchunks_size]; PRE_IVAR->memchunks = memchunks; PRE_IVAR->memchunks[PRE_IVAR->memchunks_size] = ptr; PRE_IVAR->memchunks_size = memchunks_size; @@ -226,20 +226,20 @@ memchunks_size = PRE_IVAR->memchunks_size + 1; if (SIZE_MAX - PRE_IVAR->memchunks_size == 0 || memchunks_size > SIZE_MAX / sizeof(void*)) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; if ((ptr = malloc(size)) == NULL) - @throw [OFNoMemException newWithClass: [self class] + @throw [OFNoMemException newWithClass: isa andSize: size]; if ((memchunks = realloc(PRE_IVAR->memchunks, memchunks_size * sizeof(void*))) == NULL) { free(ptr); - @throw [OFNoMemException newWithClass: [self class] + @throw [OFNoMemException newWithClass: isa andSize: memchunks_size]; } PRE_IVAR->memchunks = memchunks; PRE_IVAR->memchunks[PRE_IVAR->memchunks_size] = ptr; @@ -253,11 +253,11 @@ { if (nitems == 0 || size == 0) return NULL; if (nitems > SIZE_MAX / size) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; return [self getMemWithSize: nitems * size]; } - (void*)resizeMem: (void*)ptr @@ -276,20 +276,19 @@ iter = PRE_IVAR->memchunks + PRE_IVAR->memchunks_size; while (iter-- > PRE_IVAR->memchunks) { if (OF_UNLIKELY(*iter == ptr)) { if (OF_UNLIKELY((ptr = realloc(ptr, size)) == NULL)) - @throw [OFNoMemException - newWithClass: [self class] - andSize: size]; + @throw [OFNoMemException newWithClass: isa + andSize: size]; *iter = ptr; return ptr; } } - @throw [OFMemNotPartOfObjException newWithClass: [self class] + @throw [OFMemNotPartOfObjException newWithClass: isa andPointer: ptr]; return NULL; /* never reached, but makes gcc happy */ } - (void*)resizeMem: (void*)ptr @@ -306,11 +305,11 @@ [self freeMem: ptr]; return NULL; } if (nitems > SIZE_MAX / size) - @throw [OFOutOfRangeException newWithClass: [self class]]; + @throw [OFOutOfRangeException newWithClass: isa]; memsize = nitems * size; return [self resizeMem: ptr toSize: memsize]; } @@ -331,11 +330,11 @@ last = PRE_IVAR->memchunks[memchunks_size]; if (OF_UNLIKELY(PRE_IVAR->memchunks_size == 0 || memchunks_size > SIZE_MAX / sizeof(void*))) @throw [OFOutOfRangeException - newWithClass: [self class]]; + newWithClass: isa]; if (OF_UNLIKELY(memchunks_size == 0)) { free(ptr); free(PRE_IVAR->memchunks); @@ -347,11 +346,11 @@ if (OF_UNLIKELY((memchunks = realloc( PRE_IVAR->memchunks, memchunks_size * sizeof(void*))) == NULL)) @throw [OFNoMemException - newWithClass: [self class] + newWithClass: isa andSize: memchunks_size]; free(ptr); PRE_IVAR->memchunks = memchunks; PRE_IVAR->memchunks[i] = last; @@ -359,11 +358,11 @@ return self; } } - @throw [OFMemNotPartOfObjException newWithClass: [self class] + @throw [OFMemNotPartOfObjException newWithClass: isa andPointer: ptr]; return self; /* never reached, but makes gcc happy */ } - retain Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -156,11 +156,11 @@ switch (check_utf8(str, length)) { case 1: is_utf8 = YES; break; case -1: - c = [self class]; + c = isa; [super free]; @throw [OFInvalidEncodingException newWithClass: c]; } @@ -196,17 +196,17 @@ int t; Class c; if ((self = [super init])) { if (fmt == NULL) { - c = [self class]; + c = isa; [super free]; @throw [OFInvalidFormatException newWithClass: c]; } if ((t = vasprintf(&string, fmt, args)) == -1) { - c = [self class]; + c = isa; [super free]; @throw [OFInitializationFailedException newWithClass: c]; } length = t; @@ -215,11 +215,11 @@ case 1: is_utf8 = YES; break; case -1: free(string); - c = [self class]; + c = isa; [super free]; @throw [OFInvalidEncodingException newWithClass: c]; } @try { @@ -264,11 +264,11 @@ case -1: string = NULL; length = 0; is_utf8 = NO; - @throw [OFInvalidEncodingException newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; } length = len; string = [self getMemWithSize: length + 1]; memcpy(string, str, length + 1); @@ -289,11 +289,11 @@ - (int)compare: (id)obj { if (![obj isKindOf: [OFString class]] && ![obj isKindOf: [OFConstString class]]) - @throw [OFInvalidArgumentException newWithClass: [self class]]; + @throw [OFInvalidArgumentException newWithClass: isa]; return strcmp(string, [obj cString]); } - (uint32_t)hash @@ -324,11 +324,11 @@ switch (check_utf8(str, strlength)) { case 1: is_utf8 = YES; break; case -1: - @throw [OFInvalidEncodingException newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; } newlen = length + strlength; newstr = [self resizeMem: string toSize: newlen + 1]; @@ -358,19 +358,19 @@ andArguments: (va_list)args { char *t; if (fmt == NULL) - @throw [OFInvalidFormatException newWithClass: [self class]]; + @throw [OFInvalidFormatException newWithClass: isa]; if ((vasprintf(&t, fmt, args)) == -1) /* * This is only the most likely error to happen. * Unfortunately, as errno isn't always thread-safe, there's * no good way for us to find out what really happened. */ - @throw [OFNoMemException newWithClass: [self class]]; + @throw [OFNoMemException newWithClass: isa]; @try { [self appendCString: t]; } @finally { free(t); @@ -403,19 +403,17 @@ continue; /* A start byte can't happen first as we reversed everything */ if (OF_UNLIKELY(string[i] & 0x40)) { madvise(string, len, MADV_NORMAL); - @throw [OFInvalidEncodingException - newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; } /* Next byte must not be ASCII */ if (OF_UNLIKELY(length < i + 1 || !(string[i + 1] & 0x80))) { madvise(string, len, MADV_NORMAL); - @throw [OFInvalidEncodingException - newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; } /* Next byte is the start byte */ if (OF_LIKELY(string[i + 1] & 0x40)) { string[i] ^= string[i + 1]; @@ -427,12 +425,11 @@ } /* Second next byte must not be ASCII */ if (OF_UNLIKELY(length < i + 2 || !(string[i + 2] & 0x80))) { madvise(string, len, MADV_NORMAL); - @throw [OFInvalidEncodingException - newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; } /* Second next byte is the start byte */ if (OF_LIKELY(string[i + 2] & 0x40)) { string[i] ^= string[i + 2]; @@ -444,12 +441,11 @@ } /* Third next byte must not be ASCII */ if (OF_UNLIKELY(length < i + 3 || !(string[i + 3] & 0x80))) { madvise(string, len, MADV_NORMAL); - @throw [OFInvalidEncodingException - newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; } /* Third next byte is the start byte */ if (OF_LIKELY(string[i + 3] & 0x40)) { string[i] ^= string[i + 3]; @@ -464,11 +460,11 @@ continue; } /* UTF-8 does not allow more than 4 bytes per character */ madvise(string, len, MADV_NORMAL); - @throw [OFInvalidEncodingException newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; } madvise(string, len, MADV_NORMAL); return self; @@ -477,11 +473,11 @@ - upper { char *p = string + length; if (is_utf8) - @throw [OFInvalidEncodingException newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; while (--p >= string) *p = toupper((int)*p); return self; @@ -490,13 +486,13 @@ - lower { char *p = string + length; if (is_utf8) - @throw [OFInvalidEncodingException newWithClass: [self class]]; + @throw [OFInvalidEncodingException newWithClass: isa]; while (--p >= string) *p = tolower((int)*p); return self; } @end Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -82,24 +82,24 @@ { struct addrinfo hints, *res, *res0; char portstr[6]; if (!port) - @throw [OFInvalidPortException newWithClass: [self class]]; + @throw [OFInvalidPortException newWithClass: isa]; if (sock != INVALID_SOCKET) - @throw [OFAlreadyConnectedException newWithClass: [self class]]; + @throw [OFAlreadyConnectedException newWithClass: isa]; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; snprintf(portstr, 6, "%d", port); if (getaddrinfo(host, portstr, &hints, &res0)) @throw [OFAddressTranslationFailedException - newWithClass: [self class] + newWithClass: isa andNode: host andService: portstr]; for (res = res0; res != NULL; res = res->ai_next) { if ((sock = socket(res->ai_family, res->ai_socktype, @@ -116,11 +116,11 @@ } freeaddrinfo(res0); if (sock == INVALID_SOCKET) - @throw [OFConnectionFailedException newWithClass: [self class] + @throw [OFConnectionFailedException newWithClass: isa andHost: host andPort: port]; return self; } @@ -131,17 +131,17 @@ { struct addrinfo hints, *res; char portstr[6]; if (!port) - @throw [OFInvalidPortException newWithClass: [self class]]; + @throw [OFInvalidPortException newWithClass: isa]; if (sock != INVALID_SOCKET) - @throw [OFAlreadyConnectedException newWithClass: [self class]]; + @throw [OFAlreadyConnectedException newWithClass: isa]; if ((sock = socket(family, SOCK_STREAM, 0)) == INVALID_SOCKET) - @throw [OFBindFailedException newWithClass: [self class] + @throw [OFBindFailedException newWithClass: isa andHost: host andPort: port andFamily: family]; memset(&hints, 0, sizeof(struct addrinfo)); @@ -150,17 +150,17 @@ snprintf(portstr, 6, "%d", port); if (getaddrinfo(host, portstr, &hints, &res)) @throw [OFAddressTranslationFailedException - newWithClass: [self class] + newWithClass: isa andNode: host andService: portstr]; if (bind(sock, res->ai_addr, res->ai_addrlen) == -1) { freeaddrinfo(res); - @throw [OFBindFailedException newWithClass: [self class] + @throw [OFBindFailedException newWithClass: isa andHost: host andPort: port andFamily: family]; } @@ -170,26 +170,26 @@ } - listenWithBackLog: (int)backlog { if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException newWithClass: [self class]]; + @throw [OFNotConnectedException newWithClass: isa]; if (listen(sock, backlog) == -1) - @throw [OFListenFailedException newWithClass: [self class] + @throw [OFListenFailedException newWithClass: isa andBackLog: backlog]; return self; } - listen { if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException newWithClass: [self class]]; + @throw [OFNotConnectedException newWithClass: isa]; if (listen(sock, 5) == -1) - @throw [OFListenFailedException newWithClass: [self class] + @throw [OFListenFailedException newWithClass: isa andBackLog: 5]; return self; } @@ -210,11 +210,11 @@ @throw e; } if ((s = accept(sock, addr, &addrlen)) == INVALID_SOCKET) { [newsock free]; - @throw [OFAcceptFailedException newWithClass: [self class]]; + @throw [OFAcceptFailedException newWithClass: isa]; } [newsock setSocket: s]; [newsock setSocketAddress: addr withLength: addrlen]; @@ -226,17 +226,17 @@ intoBuffer: (char*)buf { ssize_t ret; if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException newWithClass: [self class]]; + @throw [OFNotConnectedException newWithClass: isa]; switch ((ret = recv(sock, buf, size, 0))) { case 0: - @throw [OFNotConnectedException newWithClass: [self class]]; + @throw [OFNotConnectedException newWithClass: isa]; case -1: - @throw [OFReadFailedException newWithClass: [self class] + @throw [OFReadFailedException newWithClass: isa andSize: size]; } /* This is safe, as we already checked < 1 */ return ret; @@ -246,24 +246,24 @@ fromBuffer: (const char*)buf { ssize_t ret; if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException newWithClass: [self class]]; + @throw [OFNotConnectedException newWithClass: isa]; if ((ret = send(sock, buf, size, 0)) == -1) - @throw [OFWriteFailedException newWithClass: [self class] + @throw [OFWriteFailedException newWithClass: isa andSize: size]; /* This is safe, as we already checked for -1 */ return ret; } - (size_t)writeCString: (const char*)str { if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException newWithClass: [self class]]; + @throw [OFNotConnectedException newWithClass: isa]; return [self writeNBytes: strlen(str) fromBuffer: str]; } @@ -271,24 +271,24 @@ { #ifndef _WIN32 int flags; if ((flags = fcntl(sock, F_GETFL)) == -1) - @throw [OFSetOptionFailedException newWithClass: [self class]]; + @throw [OFSetOptionFailedException newWithClass: isa]; if (enable) flags &= ~O_NONBLOCK; else flags |= O_NONBLOCK; if (fcntl(sock, F_SETFL, flags) == -1) - @throw [OFSetOptionFailedException newWithClass: [self class]]; + @throw [OFSetOptionFailedException newWithClass: isa]; #else u_long v = enable; if (ioctlsocket(sock, FIONBIO, &v) == SOCKET_ERROR) - @throw [OFSetOptionFailedException newWithClass: [self class]]; + @throw [OFSetOptionFailedException newWithClass: isa]; #endif return self; } @@ -295,19 +295,19 @@ - enableKeepAlives: (BOOL)enable { int v = enable; if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, sizeof(v))) - @throw [OFSetOptionFailedException newWithClass: [self class]]; + @throw [OFSetOptionFailedException newWithClass: isa]; return self; } - close { if (sock == INVALID_SOCKET) - @throw [OFNotConnectedException newWithClass: [self class]]; + @throw [OFNotConnectedException newWithClass: isa]; sock = INVALID_SOCKET; if (saddr != NULL) [self freeMem: saddr];