Skip to content

Instantly share code, notes, and snippets.

@lorenbrichter
Created July 4, 2011 20:21
Show Gist options
  • Save lorenbrichter/1063878 to your computer and use it in GitHub Desktop.
Save lorenbrichter/1063878 to your computer and use it in GitHub Desktop.
blockSafe
#define blockSafe_cat(A, B) A##B
#define blockSafe_line(V, TMP) typeof(V) blockSafe_cat(blockSafe_tmp__, TMP) = V; __block typeof(V) V = blockSafe_cat(blockSafe_tmp__, TMP)
#define blockSafe(V) blockSafe_line(V, __LINE__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment