From a40f9a6e2cd0969102314dd4c70132621a1cf243 Mon Sep 17 00:00:00 2001 From: theraven Date: Sun, 9 Oct 2011 21:21:17 +0000 Subject: [PATCH] Fix the x86-64 non-sret trampoline, implement the sret one. --- Test/BlockImpTest.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Test/BlockImpTest.m b/Test/BlockImpTest.m index 3e7fb66..c6eda71 100644 --- a/Test/BlockImpTest.m +++ b/Test/BlockImpTest.m @@ -35,10 +35,15 @@ int main(void) return b; }; imp = imp_implementationWithBlock(blk); + assert(imp && "Can't make sret IMP"); char *type; asprintf(&type, "%s@:", @encode(struct big)); class_addMethod((objc_getMetaClass("Foo")), @selector(sret), imp, type); struct big s = [Foo sret]; - fprintf(stderr, "%d %d %d %d %d\n", s.a, s.b, s.c, s.d, s.e); + assert(s.a == 1); + assert(s.b == 2); + assert(s.c == 3); + assert(s.d == 4); + assert(s.e == 5); return 0; }