Index: src/OFIntrospection.m ================================================================== --- src/OFIntrospection.m +++ src/OFIntrospection.m @@ -30,11 +30,11 @@ #import "autorelease.h" #import "macros.h" @implementation OFMethod #if defined(OF_OBJFW_RUNTIME) -- OF_initWithMethod: (struct objc_method*)method +- (instancetype)OF_initWithMethod: (struct objc_method*)method { self = [super init]; @try { _selector = (SEL)&method->sel; @@ -47,11 +47,11 @@ } return self; } #elif defined(OF_APPLE_RUNTIME) -- OF_initWithMethod: (Method)method +- (instancetype)OF_initWithMethod: (Method)method { self = [super init]; @try { _selector = method_getName(method); @@ -143,11 +143,11 @@ } @end @implementation OFInstanceVariable #if defined(OF_OBJFW_RUNTIME) -- OF_initWithIvar: (struct objc_ivar*)ivar +- (instancetype)OF_initWithIvar: (struct objc_ivar*)ivar { self = [super init]; @try { _name = [[OFString alloc] initWithUTF8String: ivar->name]; @@ -159,11 +159,11 @@ } return self; } #elif defined(OF_APPLE_RUNTIME) -- OF_initWithIvar: (Ivar)ivar +- (instancetype)OF_initWithIvar: (Ivar)ivar { self = [super init]; @try { _name = [[OFString alloc] Index: src/OFMapTable.m ================================================================== --- src/OFMapTable.m +++ src/OFMapTable.m @@ -674,14 +674,14 @@ } abort(); } -- OF_initWithMapTable: (OFMapTable*)mapTable - buckets: (struct of_map_table_bucket**)buckets - capacity: (uint32_t)capacity - mutationsPointer: (unsigned long*)mutationsPtr +- (instancetype)OF_initWithMapTable: (OFMapTable*)mapTable + buckets: (struct of_map_table_bucket**)buckets + capacity: (uint32_t)capacity + mutationsPointer: (unsigned long*)mutationsPtr { self = [super init]; _mapTable = [mapTable retain]; _buckets = buckets; Index: src/OFStdIOStream.h ================================================================== --- src/OFStdIOStream.h +++ src/OFStdIOStream.h @@ -26,11 +26,11 @@ { int _fd; bool _atEndOfStream; } -- OF_initWithFileDescriptor: (int)fd; +- (instancetype)OF_initWithFileDescriptor: (int)fd; @end #ifdef __cplusplus extern "C" { #endif Index: src/OFStdIOStream.m ================================================================== --- src/OFStdIOStream.m +++ src/OFStdIOStream.m @@ -73,11 +73,11 @@ } abort(); } -- OF_initWithFileDescriptor: (int)fd +- (instancetype)OF_initWithFileDescriptor: (int)fd { self = [super init]; _fd = fd; Index: src/OFString_UTF8.h ================================================================== --- src/OFString_UTF8.h +++ src/OFString_UTF8.h @@ -36,13 +36,13 @@ char *freeWhenDone; } *restrict _s; struct of_string_utf8_ivars _storage; } -- OF_initWithUTF8String: (const char*)UTF8String - length: (size_t)UTF8StringLength - storage: (char*)storage; +- (instancetype)OF_initWithUTF8String: (const char*)UTF8String + length: (size_t)UTF8StringLength + storage: (char*)storage; @end #ifdef __cplusplus extern "C" { #endif Index: src/OFString_UTF8.m ================================================================== --- src/OFString_UTF8.m +++ src/OFString_UTF8.m @@ -166,13 +166,13 @@ } return self; } -- OF_initWithUTF8String: (const char*)UTF8String - length: (size_t)UTF8StringLength - storage: (char*)storage +- (instancetype)OF_initWithUTF8String: (const char*)UTF8String + length: (size_t)UTF8StringLength + storage: (char*)storage { self = [super init]; @try { if (UTF8StringLength >= 3 && Index: src/OFTimer.m ================================================================== --- src/OFTimer.m +++ src/OFTimer.m @@ -215,18 +215,18 @@ } abort(); } -- OF_initWithFireDate: (OFDate*)fireDate - interval: (double)interval - target: (id)target - selector: (SEL)selector - object: (id)object1 - object: (id)object2 - arguments: (uint8_t)arguments - repeats: (bool)repeats +- (instancetype)OF_initWithFireDate: (OFDate*)fireDate + interval: (double)interval + target: (id)target + selector: (SEL)selector + object: (id)object1 + object: (id)object2 + arguments: (uint8_t)arguments + repeats: (bool)repeats { self = [super init]; @try { _fireDate = [fireDate retain];