Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define MACROTABLE(ID,NAME,...) \
- static const int COMMAND_##NAME = ID; \
- struct command_##NAME { \
- __VA_ARGS__ \
- }; \
- static const int COMMAND_##NAME##_sizeof = sizeof(command_##NAME);
- //EXAMPLE
- MACROTABLE(1234, step,
- int kind;
- int size
- );
- -->
- static const int COMMAND_step = 1234;
- struct command_step {
- int kind;
- int size;
- };
- static const int COMMAND_step_sizeof = 8;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement