search for: 9210cf8

Displaying 2 results from an estimated 2 matches for "9210cf8".

Did you mean: 8921bcf8
2016 Aug 23
1
[PATCH] mllib: do not assume $PATH is set
...handle the case where $PATH is not set (it will raise Executable_not_found, but that is the expected thing to do). Related to RHBZ#1367839. --- mllib/common_utils.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index fdca713..9210cf8 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -319,7 +319,9 @@ let protect ~f ~finally = match r with Either ret -> ret | Or exn -> raise exn let which executable = - let paths = String.nsplit ":" (Sys.getenv "PATH") in + let paths = + try St...
2016 Aug 25
1
[PATCH] mllib: Add String.map function for OCaml < 4.00.0.
...ase_ascii etc. Therefore include a definition of the function for older versions of OCaml. (Debian Wheezy has OCaml 3.12.1.) --- mllib/common_utils.ml | 8 ++++++++ mllib/common_utils.mli | 2 ++ 2 files changed, 10 insertions(+) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 9210cf8..4e36d50 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -38,6 +38,14 @@ end module String = struct include String + let map f s = + let len = String.length s in + let b = Bytes.create len in + for i = 0 to len-1 do + Bytes.unsafe_set b i (f (unsaf...