From 57e6fe17689de1646a53a20a46374936391db3e2 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 8 Dec 2007 14:27:38 +0000 Subject: fix c++ interface --- ev.pod | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ev.pod') diff --git a/ev.pod b/ev.pod index ef9892e..62118f1 100644 --- a/ev.pod +++ b/ev.pod @@ -1846,14 +1846,21 @@ Example: simple class declaration and watcher initialisation ev::io iow; iow.set (&obj); -=item w->set (void (*function)(watcher &w, int), void *data = 0) +=item w->set (void *data = 0) Also sets a callback, but uses a static method or plain function as callback. The optional C argument will be stored in the watcher's C member and is free for you to use. +The prototype of the C must be C. + See the method-C above for more details. +Example: + + static void io_cb (ev::io &w, int revents) { } + iow.set (); + =item w->set (struct ev_loop *) Associates a different C with this watcher. You can only -- cgit v1.2.3