hacks/cmulti/make_struct.h
Michael Hope 5881c3f8b0 Add an example of generating the struct, encoder, and initialiser from
one definition by uisng repeated includes.
2015-05-31 17:37:04 +02:00

8 lines
153 B
C

#undef NAME
#undef FIELD
#undef END
#define NAME(x) typedef struct x##_s {
#define FIELD(type, name, def, doc) type##_t name;
#define END(x) } x##_t;