Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -118,28 +118,28 @@ * or nil if it isn't implemented */ + (IMP)instanceMethodForSelector: (SEL)selector; /** - * Replaces a method implementation with another implementation. + * Replaces an instance method implementation with another implementation. * - * \param newimp The new implementation for the method - * \param selector The selector of the method to replace + * \param newimp The new implementation for the instance method + * \param selector The selector of the instance method to replace * \return The old implementation */ + (IMP)setImplementation: (IMP)newimp - forMethod: (SEL)selector; + forInstanceMethod: (SEL)selector; /** - * Replaces a method with a method from another class. + * Replaces an instance method with an instance method from another class. * - * \param selector The selector of the method to replace - * \param class_ The class from which the new method should be taken + * \param selector The selector of the instance method to replace + * \param class_ The class from which the new instance method should be taken * \return The old implementation */ -+ (IMP)replaceMethod: (SEL)selector - withMethodFromClass: (Class)class_; ++ (IMP)replaceInstanceMethod: (SEL)selector + withInstanceMethodFromClass: (Class)class_; /** * Initializes an already allocated object. * * Derived classes may override this, but need to do self = [super init] before Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -207,11 +207,11 @@ return method_get_imp(class_get_instance_method(self, selector)); #endif } + (IMP)setImplementation: (IMP)newimp - forMethod: (SEL)selector + forInstanceMethod: (SEL)selector { #ifdef OF_APPLE_RUNTIME Method method; if ((method = class_getInstanceMethod(self, selector)) == NULL) @@ -241,12 +241,12 @@ return oldimp; #endif } -+ (IMP)replaceMethod: (SEL)selector - withMethodFromClass: (Class)class; ++ (IMP)replaceInstanceMethod: (SEL)selector + withInstanceMethodFromClass: (Class)class; { IMP newimp; #ifdef OF_APPLE_RUNTIME newimp = class_getMethodImplementation(class, selector); @@ -253,11 +253,11 @@ #else newimp = method_get_imp(class_get_instance_method(class, selector)); #endif return [self setImplementation: newimp - forMethod: selector]; + forInstanceMethod: selector]; } - init { return self;