aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorppedrot2012-11-13 23:00:11 +0000
committerppedrot2012-11-13 23:00:11 +0000
commite41da6e5e792cda94f2334ddc9a3140e792d5ef9 (patch)
tree9205d4328c314191fa2250391999d68c0f015486 /lib
parent98f3621b5b0c50aaa48c86e1d6a4269d94388bd3 (diff)
Small uniformization in String
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15970 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/cString.ml5
-rw-r--r--lib/cString.mli2
-rw-r--r--lib/flags.ml2
-rw-r--r--lib/hashcons.ml2
4 files changed, 5 insertions, 6 deletions
diff --git a/lib/cString.ml b/lib/cString.ml
index 6bc7c47295..b54c23c5b2 100644
--- a/lib/cString.ml
+++ b/lib/cString.ml
@@ -45,7 +45,7 @@ end
module type ExtS =
sig
include S
- external equal : string -> string -> bool = "caml_string_equal"
+ external equal : string -> string -> bool = "caml_string_equal" "noalloc"
val explode : string -> string list
val implode : string list -> string
val strip : string -> string
@@ -60,8 +60,7 @@ end
include String
-external equal : string -> string -> bool = "caml_string_equal"
-
+external equal : string -> string -> bool = "caml_string_equal" "noalloc"
let explode s =
let rec explode_rec n =
diff --git a/lib/cString.mli b/lib/cString.mli
index d7ce35b009..1d33cef39b 100644
--- a/lib/cString.mli
+++ b/lib/cString.mli
@@ -47,7 +47,7 @@ end
module type ExtS =
sig
include S
- external equal : string -> string -> bool = "caml_string_equal"
+ external equal : string -> string -> bool = "caml_string_equal" "noalloc"
val explode : string -> string list
val implode : string list -> string
val strip : string -> string
diff --git a/lib/flags.ml b/lib/flags.ml
index 4ec3787931..ffb324d535 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -104,7 +104,7 @@ let print_hyps_limit () = !print_hyps_limit
module StringOrd =
struct
type t = string
- let compare (x : t) (y : t) = String.compare x y
+ let compare = String.compare
end
module Stringset = Set.Make(StringOrd)
diff --git a/lib/hashcons.ml b/lib/hashcons.ml
index 745169dc08..db502c90ca 100644
--- a/lib/hashcons.ml
+++ b/lib/hashcons.ml
@@ -132,7 +132,7 @@ module Hstring = Make(
type t = string
type u = unit
let hashcons () s =(* incr accesstr;*) s
- let equal (s1 : t) (s2 : t) = s1 = s2
+ external equal : string -> string -> bool = "caml_string_equal" "noalloc"
let hash = Hashtbl.hash
end)