From ca81eb0ea8f4597156be4cc9ac591bfd76e9bcbb Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 1 Mar 2014 21:42:57 -0500 Subject: [PATCH] Fixed the preferredSize() stall. Dumb Intel ABI optimizations. Good thing with 10.6 minimum I won't have to worry about PowerPC compatibility... but if ARM ever comes to the desktop all bets are off. --- bleh_darwin.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bleh_darwin.m b/bleh_darwin.m index 1c42cca..bfd685f 100644 --- a/bleh_darwin.m +++ b/bleh_darwin.m @@ -43,7 +43,7 @@ I use int64_t for maximum safety, as my coordinates are stored as Go ints and Go */ /* -This is not documented in the docs, but is in various places on apple.com. In fact, the docs are actually WRONG: they say you pass a pointer to the structure as the first argument to objc_msgSend_stret()! And there might be some cases where we can't use stret because the struct is small enough... we'll see. (TODO) +This is not documented in the docs, but is in various places on apple.com. In fact, the docs are actually WRONG: they say you pass a pointer to the structure as the first argument to objc_msgSend_stret()! And there might be some cases where we can't use stret because the struct is small enough... */ static NSRect (*objc_msgSend_stret_rect)(id, SEL, ...) = (NSRect (*)(id, SEL, ...)) objc_msgSend_stret; @@ -82,8 +82,11 @@ id _objc_msgSend_rect_uint_uint_bool(id obj, SEL sel, int64_t x, int64_t y, int6 Same as NSRect above, but for NSSize now. */ +/* +...like this one. (Note which function is being cast below.) +*/ static NSSize (*objc_msgSend_stret_size)(id, SEL, ...) = - (NSSize (*)(id, SEL, ...)) objc_msgSend_stret; + (NSSize (*)(id, SEL, ...)) objc_msgSend; struct xsize objc_msgSend_stret_size_noargs(id obj, SEL sel) {