Liste des Groupes | Revenir à cl c |
This macro doesn't work and i don't know why. I've tried multiple
different things to try to delay the expansion of _0MAKE_LISTENER and none
of them have worked. I don't know if there's a more idiomatic way to do
this. I've tried looking at the output from putting it through ?cpp? and
that didn't work because it errored out before i could see what it
expanded to.
>
#define MAKE_LISTENER(object_type, ...) static const struct\
object_type##_listener object_type##_listener = { P99_SEQ(\
_0MAKE_LISTENER, P99_SEQ((object_type), __VA_ARGS__)) }
#define _0MAKE_LISTENER(x) _1MAKE_LISTENER (x, _2MAKE_LISTENER
#define _1MAKE_LISTENER _3MAKE_LISTENER
#define _2MAKE_LISTENER(y) y)
#define _3MAKE_LISTENER _4MAKE_LISTENER
#define _4MAKE_LISTENER(object_type, event_name) .event_name =\
callback_##object_type##_##event_name
Les messages affichés proviennent d'usenet.