diff --git a/ChangeLog b/ChangeLog index 473149b..1fdf91a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-09-10 Richard Frith-Macdonald + + * sendmsg.c: (get_imp) ... fix call to __objc_get_forward_imp to + pass nil as the receiver since we don't know the receiver at this + point. Passing the class is often wrong and can result in us calling + a class method when we want an instance method of the same name. + 2010-05-12 Adam Fedor * Version 1.7.0 Snapshot release diff --git a/sendmsg.c b/sendmsg.c index 5df8e19..ca67379 100644 --- a/sendmsg.c +++ b/sendmsg.c @@ -178,8 +178,11 @@ get_imp (Class class, SEL sel) /* The dispatch table has been installed, and the method is not in the dispatch table. So the method just doesn't exist for the class. Return the forwarding - implementation. */ - res = __objc_get_forward_imp ((id)class, sel); + implementation. + We don't know the receiver (only it's class), so we + can't pass that to the function :-( + */ + res = __objc_get_forward_imp (nil, sel); } } }