diff options
| author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2014-05-02 06:19:55 +0000 |
|---|---|---|
| committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2014-05-02 06:19:55 +0000 |
| commit | 95104b392443a02c733c3354db7062761e5a1a9c (patch) | |
| tree | 09c691c974516f85b1ac2086281b387004c775a9 /tools | |
| parent | 9baf42b72da71213f483e3cc3b9ed9088cdf76ff (diff) | |
| download | ocaml-95104b392443a02c733c3354db7062761e5a1a9c.tar.gz | |
revert commit 14719
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14723 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/objinfo.ml | 13 | ||||
| -rw-r--r-- | tools/read_cmt.ml | 11 |
2 files changed, 5 insertions, 19 deletions
diff --git a/tools/objinfo.ml b/tools/objinfo.ml index 3eaafcca73..0eb33882a0 100644 --- a/tools/objinfo.ml +++ b/tools/objinfo.ml @@ -34,15 +34,8 @@ let input_stringlist ic len = let sect = really_input_string ic len in get_string_list sect len -let dummy_crc = String.make 32 '-' - -let print_name_crc (name, crco) = - let crc = - match crco with - None -> dummy_crc - | Some crc -> Digest.to_hex crc - in - printf "\t%s\t%s\n" crc name +let print_name_crc (name, crc) = + printf "\t%s\t%s\n" (Digest.to_hex crc) name let print_line name = printf "\t%s\n" name @@ -150,7 +143,7 @@ let dump_byte ic = | "CRCS" -> p_section "Imported units" - (input_value ic : (string * Digest.t option) list) + (input_value ic : (string * Digest.t) list) | "DLLS" -> p_list "Used DLLs" diff --git a/tools/read_cmt.ml b/tools/read_cmt.ml index eacba02a50..0ff9f3df77 100644 --- a/tools/read_cmt.ml +++ b/tools/read_cmt.ml @@ -27,8 +27,6 @@ let arg_list = [ let arg_usage = "read_cmt [OPTIONS] FILE.cmt : read FILE.cmt and print related information" -let dummy_crc = String.make 32 '-' - let print_info cmt = let open Cmt_format in Printf.printf "module name: %s\n" cmt.cmt_modname; @@ -62,13 +60,8 @@ let print_info cmt = | Some digest -> Printf.printf "interface digest: %s\n" (Digest.to_hex digest); end; - List.iter (fun (name, crco) -> - let crc = - match crco with - None -> dummy_crc - | Some crc -> Digest.to_hex crc - in - Printf.printf "import: %s %s\n" name crc; + List.iter (fun (name, digest) -> + Printf.printf "import: %s %s\n" name (Digest.to_hex digest); ) (List.sort compare cmt.cmt_imports); Printf.printf "%!"; () |
