On Wed, 2009-11-11 at 12:04 -0700, David Brownell wrote:
> > +#define CALL_COMMAND_HANDLER(name, extra...) \
> > + name(cmd_ctx, cmd, args, argc, ##extra)
>
> That one I don't like. It relies on lexical capture
> for most parameters, and doesn't even use "name".
name is right up there
> +#define CALL_COMMAND_HANDLER(name, extra...) \
> + name(cmd_ctx, cmd, args, argc, ##extra)
That one I don't like. It relies on lexical capture
for most parameters, and doesn't even use "name".
Lexical capture is one of the classic Things To Avoid
for C macros ... a Dirty Trick, wh
The COMMAND_HANDLER and COMMAND_HELPER macros allow commands to be
defined in a manner that decouples them from the exact order and type of
their parameters. Once converted, incremental changes to the command
handler type can be addressed in incremental patches that do not need to
touch the entire