summaryrefslogtreecommitdiff
path: root/ev++.C
diff options
context:
space:
mode:
authorroot <root>2007-11-10 21:19:29 +0000
committerroot <root>2007-11-10 21:19:29 +0000
commitd1d02ca0040b567cfc3081701b52b0361412a444 (patch)
tree2ce03d91e0bb6051592e3fc815a7f5b9d5ab2131 /ev++.C
parent92344af49ee4ba16adc8fadb616ed750e13c4ca1 (diff)
first rough cut at c++ interface
Diffstat (limited to 'ev++.C')
-rw-r--r--ev++.C15
1 files changed, 15 insertions, 0 deletions
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<io *>(w))(revents); }
+ void cb_timer (struct ev_timer *w, int revents) { (*static_cast<timer *>(w))(revents); }
+ void cb_periodic (struct ev_periodic *w, int revents) { (*static_cast<periodic *>(w))(revents); }
+ void cb_idle (struct ev_idle *w, int revents) { (*static_cast<idle *>(w))(revents); }
+ void cb_prepare (struct ev_prepare *w, int revents) { (*static_cast<prepare *>(w))(revents); }
+ void cb_check (struct ev_check *w, int revents) { (*static_cast<check *>(w))(revents); }
+ void cb_sig (struct ev_signal *w, int revents) { (*static_cast<sig *>(w))(revents); }
+ void cb_child (struct ev_child *w, int revents) { (*static_cast<child *>(w))(revents); }
+ }
+}
+