In libobjc/: 2010-11-23 Richard Frith-Macdonald <rfm@gnu.org>

In libobjc/:
2010-11-23  Richard Frith-Macdonald <rfm@gnu.org>

	* sendmsg.c (get_imp): Fixed call to __objc_get_forward_imp to
	pass nil as the receiver since we don't know the receiver at this
	point.

From-SVN: r167092
This commit is contained in:
Richard Frith-Macdonald 2010-11-23 19:20:54 +00:00 committed by Nicola Pero
parent 9a37bc079d
commit d81e30b8d3
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2010-11-23 Richard Frith-Macdonald <rfm@gnu.org>
* sendmsg.c (get_imp): Fixed call to __objc_get_forward_imp to
pass nil as the receiver since we don't know the receiver at this
point.
2010-11-18 Nicola Pero <nicola.pero@meta-innovation.com> 2010-11-18 Nicola Pero <nicola.pero@meta-innovation.com>
* ivars.c: Include stdlib.h. * ivars.c: Include stdlib.h.

View File

@ -189,8 +189,13 @@ get_imp (Class class, SEL sel)
/* The dispatch table has been installed, and the method /* The dispatch table has been installed, and the method
is not in the dispatch table. So the method just is not in the dispatch table. So the method just
doesn't exist for the class. Return the forwarding doesn't exist for the class. Return the forwarding
implementation. */ implementation. We don't know the receiver (only its
res = __objc_get_forward_imp ((id)class, sel); class), so we have to pass 'nil' as the first
argument. Passing the class as first argument is
wrong because the class is not the receiver; it can
result in us calling a class method when we want an
instance method of the same name. */
res = __objc_get_forward_imp (nil, sel);
} }
} }
} }