On Thu, Sep 11, 2008 at 03:03:59PM +0400, Kandalintsev Alexandre <[EMAIL 
PROTECTED]> wrote:
> According to manual its possible to write
> this code(example from section "ASSOCIATING
> CUSTOM DATA WITH A WATCHER":

You must have misread something, the documentation never tells you that
using a different type for a watcher argument works.

>     ev_io_init (&stdin_watcher, stdin_cb, /*STDIN_FILENO*/ 0, EV_READ);

stdin_watcher is not of type ev_io, you have to use &stdin_watcher.io here
if you want that.

> ./test.c:17: error: ‘struct my_io’ has no member named ‘cb’
> ./test.c:17: error: ‘struct my_io’ has no member named ‘fd’
> ./test.c:17: error: ‘struct my_io’ has no member named ‘events’
>
> How to fix this problem?

Use the correct types - ev_io_* requires an ev_io * as first argument, as in
the example above.

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

_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to