A question about Macro ev_set_cb

元哲伟 yuenzhewei at gmail.com
Mon Nov 6 04:10:45 CET 2017


Hi:
I'm new in libev. When I read the header ev.h, I found ev_set_cb is defined
as
#define ev_set_cb(ev,cb_) (ev_cb_ (ev) = (cb_), memmove(&((ev_watcher
*)(ev))->cb, &ev_cb_ (ev), sizeof (ev_cb_ (ev)))). I' m curious about the
reason why a redundant memmove is needed. And I found that the memmove
action was imported in version 4.20. Could you help me with my confusion?
Best,
Yuan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20171106/8bcc4aab/attachment.html>


More information about the libev mailing list