Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jun 2018 21:34:38 +0200
From:      Ed Schouten <ed@nuxi.nl>
To:        David Bright <dab@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r335765 - head/sys/sys
Message-ID:  <CABh_MKnDatUxqnDjdgFVWTL9b-UkcdGUyHw_bqq2eX5BnazeXQ@mail.gmail.com>
In-Reply-To: <201806281701.w5SH15eP011261@repo.freebsd.org>
References:  <201806281701.w5SH15eP011261@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi David,

2018-06-28 19:01 GMT+02:00 David Bright <dab@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@nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABh_MKnDatUxqnDjdgFVWTL9b-UkcdGUyHw_bqq2eX5BnazeXQ>