Skip to content

Instantly share code, notes, and snippets.

@zakki
Created December 13, 2011 13:22
Show Gist options
  • Save zakki/1472118 to your computer and use it in GitHub Desktop.
Save zakki/1472118 to your computer and use it in GitHub Desktop.
static int* hoge_impl() {
static int hoge = 0;
return &hoge;
}
int get_hoge() {
return *hoge_impl();
}
void set_hoge(int i) {
*hoge_impl() = i;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment