From d1d02ca0040b567cfc3081701b52b0361412a444 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 10 Nov 2007 21:19:29 +0000 Subject: first rough cut at c++ interface --- ev++.C | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ev++.C (limited to 'ev++.C') diff --git a/ev++.C b/ev++.C new file mode 100644 index 0000000..f1f6ce0 --- /dev/null +++ b/ev++.C @@ -0,0 +1,15 @@ +#include "ev++.h" + +namespace ev { + extern "C" { + void cb_io (struct ev_io *w, int revents) { (*static_cast(w))(revents); } + void cb_timer (struct ev_timer *w, int revents) { (*static_cast(w))(revents); } + void cb_periodic (struct ev_periodic *w, int revents) { (*static_cast(w))(revents); } + void cb_idle (struct ev_idle *w, int revents) { (*static_cast(w))(revents); } + void cb_prepare (struct ev_prepare *w, int revents) { (*static_cast(w))(revents); } + void cb_check (struct ev_check *w, int revents) { (*static_cast(w))(revents); } + void cb_sig (struct ev_signal *w, int revents) { (*static_cast(w))(revents); } + void cb_child (struct ev_child *w, int revents) { (*static_cast(w))(revents); } + } +} + -- cgit v1.2.3