Common subdirectories: src/doc and src2/doc
Common subdirectories: src/examples and src2/examples
diff -u src/libevent.ml src2/libevent.ml
--- src/libevent.ml	2004-12-18 23:58:25.000000000 +0200
+++ src2/libevent.ml	2007-04-18 18:30:02.000000000 +0300
@@ -20,15 +20,26 @@
   | WRITE -> 0x04
   | SIGNAL -> 0x08
 
-type event_callback = Unix.file_descr -> event_flags -> unit
+type event_callback = Unix.file_descr -> event_flags list -> unit
 
 (* Use an internal hashtable to store the ocaml callbacks with the
    event *)
 let table = Hashtbl.create 0
 
+(* Precalculated as to reduce runtime impact *)
+let event_types_list_of_int =
+  let types = [TIMEOUT; READ; WRITE; SIGNAL] in
+  let table = 
+    Array.init (1 lsl List.length types)
+      (fun n ->
+	 List.filter (fun etype -> n land (int_of_event_type etype) <> 0) types
+      )
+  in
+    fun i -> table.(i land ((1 lsl List.length types) - 1))
+
 (* Called by the c-stub, locate, and call the ocaml callback *)
 let event_cb event_id fd etype =
-  (Hashtbl.find table event_id) fd etype 
+  (Hashtbl.find table event_id) fd (event_types_list_of_int etype)
   
 (* Create an event *)
 external create : unit -> event = "oc_create_event"
diff -u src/libevent.mli src2/libevent.mli
--- src/libevent.mli	2004-12-21 21:15:14.000000000 +0200
+++ src2/libevent.mli	2007-04-18 17:44:54.000000000 +0300
@@ -32,7 +32,7 @@
   | WRITE   (** A write operation is possible. *)
   | SIGNAL  (** A signal occurred. *)
 
-type event_callback = Unix.file_descr -> event_flags -> unit
+type event_callback = Unix.file_descr -> event_flags list -> unit
 (** The type of event callbacks *)
 
 (** {5 Basic Libevent Operations} *)
Only in src2: ocaml-event-event_flags_type.patch
