Module Name: src Committed By: kamil Date: Tue Aug 6 11:21:59 UTC 2019
Modified Files: src/sys/sys: event.h Log Message: 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.33 src/sys/sys/event.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.