On Fri, May 22, 2015 at 01:14:57AM -0700, Andrey Pokrovskiy 
<[email protected]> wrote:
> > so all accesss have to be against the ev_watcher struct, everywhere
> 
> So you are saying, that libev needs "(ev_watcher *)(void *)" cast
> exactly because it uses such cast (ev_watcher * type to be more
> precise) everywhere to access those members. And by uniformly

It needs the ev_watcher * cast, the additional void * cast is there to
confuse some compilers into not emitting a warning, but is generally not
very effective.

Otherwise, yes, the cast is so we access these members _always_ as
ev_watcher member, both inside libev, and in user code.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to