Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created November 10, 2010 03:39
Show Gist options
  • Save erichocean/670309 to your computer and use it in GitHub Desktop.
Save erichocean/670309 to your computer and use it in GitHub Desktop.
typedef void (^myblock)();
myblock[10] makeblocks()
{
__block double foo;
myblock[10] = malloc(sizeof(myblock) * 10);
for (int i = 0; i<10; ++i) {
myblock[i] = Block_copy(^{
foo = foo + 1;
});
}
}
@erichocean
Copy link
Author

oops, mean to add return myblock;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment