Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -357,27 +357,18 @@ } + (const char*)typeEncodingForInstanceSelector: (SEL)selector { #if defined(OF_OBJFW_RUNTIME) - const char *ret; - - if ((ret = objc_get_type_encoding(self, selector)) == NULL) - @throw [OFNotImplementedException exceptionWithClass: self - selector: selector]; - - return ret; + return objc_get_type_encoding(self, selector); #else Method m; - const char *ret; - - if ((m = class_getInstanceMethod(self, selector)) == NULL || - (ret = method_getTypeEncoding(m)) == NULL) - @throw [OFNotImplementedException exceptionWithClass: self - selector: selector]; - - return ret; + + if ((m = class_getInstanceMethod(self, selector)) == NULL) + return NULL; + + return method_getTypeEncoding(m); #endif } + (OFString*)description { @@ -810,30 +801,19 @@ } - (const char*)typeEncodingForSelector: (SEL)selector { #if defined(OF_OBJFW_RUNTIME) - const char *ret; - - if ((ret = objc_get_type_encoding(object_getClass(self), - selector)) == NULL) - @throw [OFNotImplementedException - exceptionWithClass: [self class] - selector: selector]; - - return ret; + return objc_get_type_encoding(object_getClass(self), selector); #else Method m; - const char *ret; if ((m = class_getInstanceMethod(object_getClass(self), - selector)) == NULL || (ret = method_getTypeEncoding(m)) == NULL) - @throw [OFNotImplementedException - exceptionWithClass: [self class] - selector: selector]; + selector)) == NULL) + return NULL; - return ret; + return method_getTypeEncoding(m); #endif } - (BOOL)isEqual: (id)object {