Skip to content

Instantly share code, notes, and snippets.

@rustle
Created June 25, 2012 04:33
Show Gist options
  • Save rustle/2986545 to your computer and use it in GitHub Desktop.
Save rustle/2986545 to your computer and use it in GitHub Desktop.
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