Created
January 15, 2013 20:24
-
-
Save ArnaudCourbiere/4541717 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
/* Pointer magic to determine relative addresses of variables to a | |
struct context pointer */ | |
#define CNT_OFFSET(varname) ((long)&((struct context *)NULL)->varname) | |
#define CONF_OFFSET(varname) ((long)&((struct context *)NULL)->conf.varname) | |
#define TRACK_OFFSET(varname) ((long)&((struct context *)NULL)->track.varname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment