svn commit: r335765 - head/sys/sys

Ed Schouten ed at nuxi.nl
Thu Jun 28 19:35:12 UTC 2018


Hi David,

2018-06-28 19:01 GMT+02:00 David Bright <dab at freebsd.org>:
> +#define EV_SET(kevp_, a, b, c, d, e, f) do {   \

Some time ago I also looked into this and realised that it may even be
possible to do something like this:

static __inline void
EV_SET(...)
{
}

/* Compatibility for code that tests #ifdef EV_SET. */
#define EV_SET EV_SET

This has the advantage that you get pretty neat error messages in case
you get the typing of arguments wrong, as if you're just calling a
function incorrectly. The EV_SET() macro is never used in contexts
that require constant values.

-- 
Ed Schouten <ed at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands


More information about the svn-src-head mailing list