Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -163,11 +163,11 @@ count: count] autorelease]; } - (instancetype)init { - if (object_getClass(self) == [OFArray class]) { + if ([self isMemberOfClass: [OFArray class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; Index: src/OFBlock.m ================================================================== --- src/OFBlock.m +++ src/OFBlock.m @@ -161,11 +161,11 @@ void * _Block_copy(const void *block_) { of_block_literal_t *block = (of_block_literal_t *)block_; - if (object_getClass((id)block) == (Class)&_NSConcreteStackBlock) { + if ([(id)block isMemberOfClass: (Class)&_NSConcreteStackBlock]) { of_block_literal_t *copy; if ((copy = malloc(block->descriptor->size)) == NULL) { alloc_failed_exception.isa = [OFAllocFailedException class]; @@ -181,11 +181,11 @@ block->descriptor->copy_helper(copy, block); return copy; } - if (object_getClass((id)block) == (Class)&_NSConcreteMallocBlock) { + if ([(id)block isMemberOfClass: (Class)&_NSConcreteMallocBlock]) { #ifdef OF_HAVE_ATOMIC_OPS of_atomic_int_inc(&block->flags); #else unsigned hash = SPINLOCK_HASH(block); @@ -464,11 +464,11 @@ OF_UNRECOGNIZED_SELECTOR } - (instancetype)retain { - if (object_getClass(self) == (Class)&_NSConcreteMallocBlock) + if ([self isMemberOfClass: (Class)&_NSConcreteMallocBlock]) return Block_copy(self); return self; } @@ -477,31 +477,31 @@ return Block_copy(self); } - (instancetype)autorelease { - if (object_getClass(self) == (Class)&_NSConcreteMallocBlock) + if ([self isMemberOfClass: (Class)&_NSConcreteMallocBlock]) return [super autorelease]; return self; } - (unsigned int)retainCount { - if (object_getClass(self) == (Class)&_NSConcreteMallocBlock) + if ([self isMemberOfClass: (Class)&_NSConcreteMallocBlock]) return ((of_block_literal_t *)self)->flags & OF_BLOCK_REFCOUNT_MASK; return OF_RETAIN_COUNT_MAX; } - (void)release { - if (object_getClass(self) == (Class)&_NSConcreteMallocBlock) + if ([self isMemberOfClass: (Class)&_NSConcreteMallocBlock]) Block_release(self); } - (void)dealloc { OF_DEALLOC_UNSUPPORTED } @end Index: src/OFConstantString.m ================================================================== --- src/OFConstantString.m +++ src/OFConstantString.m @@ -136,11 +136,11 @@ - (void)finishInitialization { @synchronized (self) { struct of_string_utf8_ivars *ivars; - if (object_getClass(self) == [OFString_const class]) + if ([self isMemberOfClass: [OFString_const class]]) return; if ((ivars = calloc(1, sizeof(*ivars))) == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: sizeof(*ivars)]; Index: src/OFCountedSet.m ================================================================== --- src/OFCountedSet.m +++ src/OFCountedSet.m @@ -115,11 +115,11 @@ return [super alloc]; } - (instancetype)init { - if (object_getClass(self) == [OFCountedSet class]) { + if ([self isMemberOfClass: [OFCountedSet class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -185,11 +185,11 @@ return ret; } - (instancetype)init { - if (object_getClass(self) == [OFDictionary class]) { + if ([self isMemberOfClass: [OFDictionary class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; Index: src/OFEnumerator.m ================================================================== --- src/OFEnumerator.m +++ src/OFEnumerator.m @@ -22,11 +22,11 @@ #import "OFArray.h" @implementation OFEnumerator - (instancetype)init { - if (object_getClass(self) == [OFEnumerator class]) { + if ([self isMemberOfClass: [OFEnumerator class]]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; Index: src/OFMutableArray.m ================================================================== --- src/OFMutableArray.m +++ src/OFMutableArray.m @@ -231,11 +231,11 @@ return [[[self alloc] initWithCapacity: capacity] autorelease]; } - (instancetype)init { - if (object_getClass(self) == [OFMutableArray class]) { + if ([self isMemberOfClass: [OFMutableArray class]]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; Index: src/OFMutableDictionary.m ================================================================== --- src/OFMutableDictionary.m +++ src/OFMutableDictionary.m @@ -140,11 +140,11 @@ return [[[self alloc] initWithCapacity: capacity] autorelease]; } - (instancetype)init { - if (object_getClass(self) == [OFMutableDictionary class]) { + if ([self isMemberOfClass: [OFMutableDictionary class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; Index: src/OFMutableSet.m ================================================================== --- src/OFMutableSet.m +++ src/OFMutableSet.m @@ -124,11 +124,11 @@ return [[[self alloc] initWithCapacity: capacity] autorelease]; } - (instancetype)init { - if (object_getClass(self) == [OFMutableSet class]) { + if ([self isMemberOfClass: [OFMutableSet class]]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; Index: src/OFPlugin.m ================================================================== --- src/OFPlugin.m +++ src/OFPlugin.m @@ -94,11 +94,11 @@ return plugin; } - (instancetype)init { - if (object_getClass(self) == [OFPlugin class]) { + if ([self isMemberOfClass: [OFPlugin class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; Index: src/OFSeekableStream.m ================================================================== --- src/OFSeekableStream.m +++ src/OFSeekableStream.m @@ -24,11 +24,11 @@ #import "OFSeekableStream.h" @implementation OFSeekableStream - (instancetype)init { - if (object_getClass(self) == [OFSeekableStream class]) { + if ([self isMemberOfClass: [OFSeekableStream class]]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; Index: src/OFSet.m ================================================================== --- src/OFSet.m +++ src/OFSet.m @@ -150,11 +150,11 @@ count: count] autorelease]; } - (instancetype)init { - if (object_getClass(self) == [OFSet class]) { + if ([self isMemberOfClass: [OFSet class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; Index: src/OFStream.m ================================================================== --- src/OFStream.m +++ src/OFStream.m @@ -67,11 +67,11 @@ } #endif - (instancetype)init { - if (object_getClass(self) == [OFStream class]) { + if ([self isMemberOfClass: [OFStream class]]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -828,11 +828,11 @@ return ret; } - (instancetype)init { - if (object_getClass(self) == [OFString class]) { + if ([self isMemberOfClass: [OFString class]]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e;