Last active
August 17, 2016 23:04
-
-
Save amatus/ba9c247a330eaa8933174091a473fe49 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
#define GNUNET_MQ_hd_fixed_size(name,code,str,ctx) \ | |
({ \ | |
void (*_cb)(void *cls, const str *msg) = &handle_##name; \ | |
((struct GNUNET_MQ_MessageHandler) { \ | |
NULL, (GNUNET_MQ_MessageCallback) _cb, \ | |
(ctx), (code), sizeof (str) }); \ | |
}) | |
#define GNUNET_MQ_hd_var_size(name,code,str,ctx) \ | |
({ \ | |
int (*_mv)(void *cls, const str *msg) = &check_##name; \ | |
void (*_cb)(void *cls, const str *msg) = &handle_##name; \ | |
((struct GNUNET_MQ_MessageHandler) \ | |
{ (GNUNET_MQ_MessageValidationCallback) _mv, \ | |
(GNUNET_MQ_MessageCallback) _cb, \ | |
(ctx), (code), sizeof (str) }); \ | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment