Subject: Re: merge of freebsd eventhandler
To: None <>
From: Chapman Flack <>
List: tech-kern
Date: 05/30/2006 10:24:15
Brett Lymn wrote:
> But if it's not a macro then we lose the cpp varargs so you cannot
> have a variable number of function arguments.  Even if you work around
> this by having an xxx_arg argument type then you have to cast this to
> void * so you lose the compile time type checking.
> ...
> benefits the macro provides outweigh the ugliness within.

FWIW, I'll second this reasoning: to me, it kind of goes with the
territory of devising a smart API that sometimes it's ok to have a
bit of complexity under the hood, when the effect is to simplify the
constructs the programmers will regularly /use/, or make better use
of compiler type checking. As it appears that EVENTHANDLER_INVOKE
does both, it looks like a smart design to me.