Set up the new forwarding hook in the objc_msgSend test.

This is probably wrong, as we should be calling forward2 if forward3 is not set, but it makes the test pass for now.
main
David Chisnall 10 years ago committed by Vagrant User
parent 9c7cc6ac25
commit 4a59b2a986

@ -164,9 +164,18 @@ IMP forward(id o, SEL s)
return (IMP)fwdMany; return (IMP)fwdMany;
} }
static struct objc_slot slot;
struct objc_slot *forwardslot(id o, SEL s)
{
slot.method = (IMP)fwd;
return &slot;
}
int main(void) int main(void)
{ {
__objc_msg_forward2 = forward; __objc_msg_forward2 = forward;
__objc_msg_forward3 = forward_slot;
TestCls = objc_getClass("Test"); TestCls = objc_getClass("Test");
int exceptionThrown = 0; int exceptionThrown = 0;
@try { @try {

Loading…
Cancel
Save