Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -104,12 +104,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -225,12 +224,11 @@ OF_INVALID_INIT_METHOD } - (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)getObjects: (id*)buffer inRange: (of_range_t)range { @@ -267,12 +265,11 @@ return [[OFMutableArray alloc] initWithArray: self]; } - (id)objectAtIndex: (size_t)index { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (id)objectAtIndexedSubscript: (size_t)index { return [self objectAtIndex: index]; Index: src/OFAutoreleasePool.m ================================================================== --- src/OFAutoreleasePool.m +++ src/OFAutoreleasePool.m @@ -14,12 +14,10 @@ * file. */ #include "config.h" -#include - #import "OFAutoreleasePool.h" #import "OFAutoreleasePool+Private.h" #import "macros.h" #if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS) @@ -180,15 +178,13 @@ [super dealloc]; } - retain { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - autorelease { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } @end Index: src/OFBlock.m ================================================================== --- src/OFBlock.m +++ src/OFBlock.m @@ -384,51 +384,45 @@ #endif } + alloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - init { OF_INVALID_INIT_METHOD } - (void*)allocMemoryWithSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)allocMemoryWithSize: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)ptr size: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)ptr size: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)freeMemory: (void*)ptr { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - retain { if (object_getClass(self) == (Class)&_NSConcreteMallocBlock) @@ -465,12 +459,11 @@ Block_release(self); } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end Index: src/OFConstantString.m ================================================================== --- src/OFConstantString.m +++ src/OFConstantString.m @@ -25,10 +25,12 @@ #import "OFString_UTF8.h" #import "OFInitializationFailedException.h" #import "OFInvalidEncodingException.h" #import "OFOutOfMemoryException.h" + +#import "macros.h" #if defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__) # import struct { @@ -48,47 +50,41 @@ @end @implementation OFString_const + alloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)allocMemoryWithSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)allocMemoryWithSize: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)pointer size: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)pointer size: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)freeMemory: (void*)pointer { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - retain { return self; @@ -108,12 +104,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -175,46 +170,40 @@ } } + alloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)allocMemoryWithSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)allocMemoryWithSize: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)pointer size: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)pointer size: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)freeMemory: (void*)pointer { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - retain { return self; @@ -234,12 +223,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } Index: src/OFCountedSet.m ================================================================== --- src/OFCountedSet.m +++ src/OFCountedSet.m @@ -23,10 +23,11 @@ #import "OFNumber.h" #import "OFString.h" #import "OFXMLElement.h" #import "autorelease.h" +#import "macros.h" static struct { Class isa; } placeholder; @@ -96,12 +97,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -137,12 +137,11 @@ return [super init]; } - (size_t)countForObject: (id)object { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (OFString*)description { OFMutableString *ret; Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -115,12 +115,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -271,23 +270,21 @@ OF_INVALID_INIT_METHOD } - (id)objectForKey: (id)key { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (id)objectForKeyedSubscript: (id)key { return [self objectForKey: key]; } - (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - copy { return [self retain]; @@ -413,26 +410,23 @@ return ret; } - (OFEnumerator*)objectEnumerator { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (OFEnumerator*)keyEnumerator { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count_ { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } #if defined(OF_HAVE_BLOCKS) && defined(OF_HAVE_FAST_ENUMERATION) - (void)enumerateKeysAndObjectsUsingBlock: (of_dictionary_enumeration_block_t)block Index: src/OFEnumerator.m ================================================================== --- src/OFEnumerator.m +++ src/OFEnumerator.m @@ -20,10 +20,11 @@ #import "OFEnumerator.h" #import "OFArray.h" #import "autorelease.h" +#import "macros.h" @implementation OFEnumerator - init { if (object_getClass(self) == [OFEnumerator class]) { @@ -39,12 +40,11 @@ return [super init]; } - (id)nextObject { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (OFArray*)allObjects { OFMutableArray *ret = [OFMutableArray array]; @@ -61,9 +61,8 @@ return ret; } - (void)reset { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } @end Index: src/OFMapTable.m ================================================================== --- src/OFMapTable.m +++ src/OFMapTable.m @@ -14,11 +14,10 @@ * file. */ #include "config.h" -#include #include #include #import "OFMapTable.h" @@ -698,12 +697,11 @@ [super dealloc]; } - (void*)nextValue { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)reset { if (*_mutationsPtr != _mutations) Index: src/OFMutableArray.m ================================================================== --- src/OFMutableArray.m +++ src/OFMutableArray.m @@ -149,12 +149,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -217,12 +216,11 @@ } - (void)insertObject: (id)object atIndex: (size_t)index { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)insertObjectsFromArray: (OFArray*)array atIndex: (size_t)index { @@ -243,12 +241,11 @@ } - (void)replaceObjectAtIndex: (size_t)index withObject: (id)object { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)setObject: (id)object atIndexedSubscript: (size_t)index { @@ -295,12 +292,11 @@ } } - (void)removeObjectAtIndex: (size_t)index { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)removeObject: (id)object { size_t i, count; Index: src/OFMutableDictionary.m ================================================================== --- src/OFMutableDictionary.m +++ src/OFMutableDictionary.m @@ -116,12 +116,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -168,12 +167,11 @@ } - (void)setObject: (id)object forKey: (id)key { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)setObject: (id)object forKeyedSubscript: (id)key { @@ -181,12 +179,11 @@ forKey: key]; } - (void)removeObjectForKey: (id)key { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)removeAllObjects { void *pool = objc_autoreleasePoolPush(); Index: src/OFMutableSet.m ================================================================== --- src/OFMutableSet.m +++ src/OFMutableSet.m @@ -22,10 +22,11 @@ #import "OFMutableSet.h" #import "OFMutableSet_hashtable.h" #import "autorelease.h" +#import "macros.h" static struct { Class isa; } placeholder; @@ -95,12 +96,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -135,18 +135,16 @@ return [super init]; } - (void)addObject: (id)object { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)removeObject: (id)object { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)minusSet: (OFSet*)set { void *pool = objc_autoreleasePoolPush(); Index: src/OFMutableString.m ================================================================== --- src/OFMutableString.m +++ src/OFMutableString.m @@ -217,12 +217,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -449,12 +448,11 @@ } - (void)replaceCharactersInRange: (of_range_t)range withString: (OFString*)replacement { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)replaceOccurrencesOfString: (OFString*)string withString: (OFString*)replacement { Index: src/OFNull.m ================================================================== --- src/OFNull.m +++ src/OFNull.m @@ -14,20 +14,19 @@ * file. */ #include "config.h" -#include - #import "OFNull.h" #import "OFString.h" #import "OFXMLElement.h" #import "OFDataArray.h" #import "OFInvalidArgumentException.h" #import "autorelease.h" +#import "macros.h" static OFNull *null = nil; @implementation OFNull + (void)initialize @@ -117,12 +116,11 @@ return OF_RETAIN_COUNT_MAX; } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -1108,40 +1108,35 @@ * Those are needed as the root class is the superclass of the root class's * metaclass and thus instance methods can be sent to class objects as well. */ + (void*)allocMemoryWithSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } + (void*)allocMemoryWithSize: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } + (void*)resizeMemory: (void*)pointer size: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } + (void*)resizeMemory: (void*)pointer size: (size_t)size count: (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } + (void)freeMemory: (void*)pointer { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } + retain { return self; @@ -1161,20 +1156,18 @@ { } + (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } + copy { return self; } + mutableCopyWithZone: (void*)zone { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } @end Index: src/OFProcess.m ================================================================== --- src/OFProcess.m +++ src/OFProcess.m @@ -14,11 +14,10 @@ * file. */ #include "config.h" -#include #include #ifndef _WIN32 # include # include @@ -436,22 +435,20 @@ - (int)fileDescriptorForReading { #ifndef _WIN32 return _readPipe[0]; #else - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR #endif } - (int)fileDescriptorForWriting { #ifndef _WIN32 return _writePipe[1]; #else - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR #endif } - (void)closeForWriting { Index: src/OFSeekableStream.m ================================================================== --- src/OFSeekableStream.m +++ src/OFSeekableStream.m @@ -18,10 +18,12 @@ #include #include #import "OFSeekableStream.h" + +#import "macros.h" @implementation OFSeekableStream - init { if (object_getClass(self) == [OFSeekableStream class]) { @@ -38,12 +40,11 @@ } - (off_t)lowlevelSeekToOffset: (off_t)offset whence: (int)whence { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (off_t)seekToOffset: (off_t)offset whence: (int)whence { Index: src/OFSet.m ================================================================== --- src/OFSet.m +++ src/OFSet.m @@ -96,12 +96,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -212,32 +211,28 @@ OF_INVALID_INIT_METHOD } - (size_t)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (bool)containsObject: (id)object { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (OFEnumerator*)objectEnumerator { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (bool)isEqual: (id)object { OFSet *otherSet; Index: src/OFSortedList.m ================================================================== --- src/OFSortedList.m +++ src/OFSortedList.m @@ -14,39 +14,35 @@ * file. */ #include "config.h" -#include - #import "OFSortedList.h" + +#import "macros.h" @implementation OFSortedList - (of_list_object_t*)appendObject: (id)object { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (of_list_object_t*)prependObject: (id)object { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (of_list_object_t*)insertObject: (id)object beforeListObject: (of_list_object_t*)listObject { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (of_list_object_t*)insertObject: (id)object afterListObject: (of_list_object_t*)listObject { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (of_list_object_t*)insertObject: (id )object { of_list_object_t *iter; Index: src/OFStdIOStream.m ================================================================== --- src/OFStdIOStream.m +++ src/OFStdIOStream.m @@ -14,11 +14,10 @@ * file. */ #include "config.h" -#include #include #import "OFStdIOStream.h" #import "OFDate.h" #import "OFApplication.h" @@ -151,12 +150,11 @@ return OF_RETAIN_COUNT_MAX; } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of stupid warning */ [super dealloc]; } @end Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -76,26 +76,23 @@ return self; } - (bool)lowlevelIsAtEndOfStream { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (size_t)lowlevelReadIntoBuffer: (void*)buffer length: (size_t)length { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)lowlevelWriteBuffer: (const void*)buffer length: (size_t)length { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - copy { return [self retain]; @@ -1531,25 +1528,22 @@ @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; _blocking = enable; #else - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR #endif } - (int)fileDescriptorForReading { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (int)fileDescriptorForWriting { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } #ifdef OF_HAVE_SOCKETS - (void)cancelAsyncRequests { @@ -1572,14 +1566,13 @@ _readBufferLength += length; } - (void)close { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (bool)OF_isWaitingForDelimiter { return _waitingForDelimiter; } @end Index: src/OFStreamObserver.m ================================================================== --- src/OFStreamObserver.m +++ src/OFStreamObserver.m @@ -16,12 +16,10 @@ #include "config.h" #define __NO_EXT_QNX -#include - #include #include #import "OFStreamObserver.h" @@ -297,30 +295,26 @@ [self cancel]; } - (void)OF_addFileDescriptorForReading: (int)fd { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)OF_addFileDescriptorForWriting: (int)fd { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)OF_removeFileDescriptorForReading: (int)fd { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)OF_removeFileDescriptorForWriting: (int)fd { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)OF_processQueue { #ifdef OF_HAVE_THREADS @@ -399,12 +393,11 @@ [self observeForTimeInterval: -1]; } - (bool)observeForTimeInterval: (double)timeInterval { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (bool)observeUntilDate: (OFDate*)date { return [self observeForTimeInterval: [date timeIntervalSinceNow]]; Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -454,12 +454,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } @end @@ -1229,12 +1228,11 @@ return [self cStringWithEncoding: OF_STRING_ENCODING_UTF_8]; } - (size_t)length { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding { switch (encoding) { @@ -1273,12 +1271,11 @@ return [self cStringLengthWithEncoding: OF_STRING_ENCODING_UTF_8]; } - (of_unichar_t)characterAtIndex: (size_t)index { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)getCharacters: (of_unichar_t*)buffer inRange: (of_range_t)range { Index: src/OFSystemInfo.m ================================================================== --- src/OFSystemInfo.m +++ src/OFSystemInfo.m @@ -18,21 +18,21 @@ #define __NO_EXT_QNX #import "OFSystemInfo.h" -#include - #include #ifdef __QNX__ # include #endif #ifdef _WIN32 # include #endif + +#import "macros.h" static size_t pageSize; static size_t numberOfCPUs; @implementation OFSystemInfo @@ -62,12 +62,11 @@ #endif } + alloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } + (size_t)pageSize { return pageSize; Index: src/OFXMLNode.m ================================================================== --- src/OFXMLNode.m +++ src/OFXMLNode.m @@ -14,12 +14,10 @@ * file. */ #include "config.h" -#include - #import "OFXMLNode.h" #import "OFString.h" #import "macros.h" @@ -29,12 +27,11 @@ OF_INVALID_INIT_METHOD } - (OFString*)stringValue { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (intmax_t)decimalValue { return [[self stringValue] decimalValue]; @@ -68,25 +65,23 @@ } - (OFString*)XMLStringWithIndentation: (unsigned int)indentation level: (unsigned int)level { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (OFString*)description { return [self XMLStringWithIndentation: 2]; } - (OFXMLElement*)XMLElementBySerializing { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - copy { return [self retain]; } @end Index: src/exceptions/OFAllocFailedException.m ================================================================== --- src/exceptions/OFAllocFailedException.m +++ src/exceptions/OFAllocFailedException.m @@ -14,61 +14,53 @@ * file. */ #include "config.h" -#include - #import "OFAllocFailedException.h" #import "OFString.h" #import "macros.h" @implementation OFAllocFailedException + alloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - init { OF_INVALID_INIT_METHOD } - (void*)allocMemoryWithSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)allocMemoryForNItems: (size_t)nitems withSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)ptr toSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void*)resizeMemory: (void*)ptr toNItems: (size_t)nitems withSize: (size_t)size { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - (void)freeMemory: (void*)ptr { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR } - retain { return self; @@ -88,12 +80,11 @@ { } - (void)dealloc { - [self doesNotRecognizeSelector: _cmd]; - abort(); + OF_UNRECOGNIZED_SELECTOR /* Get rid of a stupid warning */ [super dealloc]; } Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -130,10 +130,13 @@ #define OF_GETTER(ivar, atomic) \ return objc_getProperty(self, _cmd, OF_IVAR_OFFSET(ivar), atomic); #define OF_SETTER(ivar, value, atomic, copy) \ objc_setProperty(self, _cmd, OF_IVAR_OFFSET(ivar), value, atomic, copy); +#define OF_UNRECOGNIZED_SELECTOR \ + [self doesNotRecognizeSelector: _cmd]; \ + abort(); #define OF_INVALID_INIT_METHOD \ @try { \ [self doesNotRecognizeSelector: _cmd]; \ } @catch (id e) { \ [self release]; \