libevent: fix compatibility with light FFI and global/semi-global
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 18 Oct 2016 20:18:55 +0000 (16:18 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 18 Oct 2016 20:18:55 +0000 (16:18 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/libevent.nit

index 39b9316..0468fbc 100644 (file)
@@ -65,16 +65,16 @@ in "C" `{
        {
                ConnectionFactory_accept_connection(ctx, listener, fd, addrin, socklen);
        }
+#endif
 
+#ifdef EventCallback_incr_ref
        // Callback forwarded to 'EventCallback.callback'
        static void signal_cb(evutil_socket_t fd, short events, void *data)
        {
                EventCallback handler = data;
                EventCallback_callback(handler, events);
        }
-
 #endif
-
 `}
 
 # Structure to hold information and state for a Libevent dispatch loop.