X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fxmpp_xmacros.h;fp=citadel%2Fmodules%2Fxmpp%2Fxmpp_xmacros.h;h=3d5d94d539f941b07780c2c1506aca935f68b524;hb=85a4d8d0b5af0edda2a0fa27c66457b775eb1209;hp=0000000000000000000000000000000000000000;hpb=0635359a1b34a42926f5ab9566cb91d5071c438c;p=citadel.git diff --git a/citadel/modules/xmpp/xmpp_xmacros.h b/citadel/modules/xmpp/xmpp_xmacros.h new file mode 100644 index 000000000..3d5d94d53 --- /dev/null +++ b/citadel/modules/xmpp/xmpp_xmacros.h @@ -0,0 +1,35 @@ + +/* + * define the structures for one token each + * typename: TheToken_ + */ +#define STRPROP(STRUCTNAME, NAME) StrBuf *NAME; +#define TOKEN(NAME, STRUCT) typedef struct __##NAME \ + STRUCT \ + TheToken_##NAME; +#include "token.def" +#undef STRPROP +#undef TOKEN + + +/* + * forward declarations for freeing the members of one struct instance + # name: free_buf_ + */ + +#define TOKEN(NAME, STRUCT) \ + void free_buf_##NAME(TheToken_##NAME *pdata); +#include "token.def" +#undef STRPROP +#undef TOKEN + +/* + * forward declarations, freeing structs and member. + * name: free_ + */ +#define TOKEN(NAME, STRUCT) \ + void free_##NAME(TheToken_##NAME *pdata); + +#include "token.def" +#undef STRPROP +#undef TOKEN