Created
June 25, 2012 04:33
-
-
Save rustle/2986545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct block_literal { | |
void *isa; | |
int flags; | |
int reserved; | |
void (*invoke)(void *); | |
void *descriptor; | |
void *byref_obj; | |
}; | |
void foo(void) | |
{ | |
id block = ^(void) { | |
NSLog(@"test"); | |
}; | |
void (*invoke)(void *) = ((__bridge struct block_literal *)block)->invoke; | |
invoke(NULL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment