summaryrefslogtreecommitdiff
path: root/dev-ml/extlib/files/ocaml405.patch
blob: 4e3b04a1c8e565c13676327f2bc44662b54327ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Index: ocaml-extlib-1.7.1/src/configure.ml
===================================================================
--- ocaml-extlib-1.7.1.orig/src/configure.ml
+++ ocaml-extlib-1.7.1/src/configure.ml
@@ -3,5 +3,6 @@ let () =
   print_endline (if Sys.ocaml_version >= "4.02.0" then "-D OCAML4_02 " else "");
   print_endline (if Sys.ocaml_version >= "4.03.0" then "-D OCAML4_03 " else "");
   print_endline (if Sys.ocaml_version >= "4.04.0" then "-D OCAML4_04 " else "");
+  print_endline (if Sys.ocaml_version >= "4.05.0" then "-D OCAML4_05 " else "");
   let (_:int) = Sys.command "ocamlfind query -format \"-D WITH_BYTES\" bytes" in ();
   exit 0
Index: ocaml-extlib-1.7.1/src/extHashtbl.mli
===================================================================
--- ocaml-extlib-1.7.1.orig/src/extHashtbl.mli
+++ ocaml-extlib-1.7.1/src/extHashtbl.mli
@@ -132,6 +132,9 @@ module type S =
     val add : 'a t -> key -> 'a -> unit
     val remove : 'a t -> key -> unit
     val find : 'a t -> key -> 'a
+#ifdef OCAML4_05
+    val find_opt:  'a t -> key -> 'a option
+#endif
     val find_all : 'a t -> key -> 'a list
     val replace : 'a t -> key -> 'a -> unit
     val mem : 'a t -> key -> bool
@@ -167,6 +170,9 @@ module type SeededS =
     val add : 'a t -> key -> 'a -> unit
     val remove : 'a t -> key -> unit
     val find : 'a t -> key -> 'a
+#ifdef OCAML4_05
+    val find_opt : 'a t -> key -> 'a option
+#endif
     val find_all : 'a t -> key -> 'a list
     val replace : 'a t -> key -> 'a -> unit
     val mem : 'a t -> key -> bool