From 5c6cd3cb7065c7ff5f702ac654620d6adacd1d06 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 27 Dec 2015 22:12:56 +0100 Subject: [PATCH] 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. --- Test/objc_msgSend.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Test/objc_msgSend.m b/Test/objc_msgSend.m index 1d4f372..4dcb95e 100644 --- a/Test/objc_msgSend.m +++ b/Test/objc_msgSend.m @@ -164,9 +164,18 @@ IMP forward(id o, SEL s) 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) { __objc_msg_forward2 = forward; + __objc_msg_forward3 = forward_slot; TestCls = objc_getClass("Test"); int exceptionThrown = 0; @try {