Blocks with return type
Blocks with return type
- Subject: Blocks with return type
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 30 Sep 2012 09:41:49 +0700
I have a typedef (no complains from Xcode - so I assume it to be correct):
typedef unsigned long (^LongBlock_t)(id a);
Now I want to set a variable to some block:
LongBlock_t aBlock = <...some magic here...> { (void)a; unsigned long x = 5; return x;};
What should <...some magic here...> look like?
And no, I do not want the block to figure out it's return type itself; I want to set it explicitly.
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden