Module Name:    src
Committed By:   martin
Date:           Tue Aug  6 16:22:04 UTC 2019

Modified Files:
        src/sys/sys [netbsd-9]: event.h

Log Message:
Pull up following revision(s) (requested by kamil in ticket #22):

        sys/sys/event.h: revision 1.33

Make EV_SET() casts compatible with the C++ code

EV_SET() handles cast that are expected to work with alternative
kqueue/kevent implementations that take arguments in different types.

Unfortunately void* -> intptr_t cast cannot be done with
static_cast<intptr_t>() as it needs reinterpret_cast<intptr_t>().

Just switching to reinterpret_cast<intptr_t>() is still not sufficient as=
it does not handle NULL argument without a compiler error/warning.

Add a compatibility function for the C++ case of _EV_SET() that accepts
the udata argument in the form of void* and performs clean
reinterpret_cast<>() internally.

There is no change for C users.

Tested by <nia>

Proposed on tech-userlevel@.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.8.1 src/sys/sys/event.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to