Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
+ #include <string.h>
#include <sys/socket.h>
#include <event2/listener.h>
`}
in "C" `{
+
+// Protect callbacks for compatibility with light FFI
+#ifdef Connection_decr_ref
+
// Callback forwarded to 'Connection.write_callback'
static void c_write_cb(struct bufferevent *bev, Connection ctx) {
Connection_write_callback(ctx);
{
ConnectionFactory_accept_connection(ctx, listener, fd, address, socklen);
}
+#endif
+
`}
# Structure to hold information and state for a Libevent dispatch loop.