Ajout de crc_of_unit
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2992 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
87ece3497e
commit
2300f8148c
|
@ -754,6 +754,15 @@ let open_pers_signature name env =
|
|||
let read_signature modname filename =
|
||||
let ps = read_pers_struct modname filename in ps.ps_sig
|
||||
|
||||
(* Return the CRC of the interface of the given compilation unit *)
|
||||
|
||||
let crc_of_unit name =
|
||||
let ps = find_pers_struct name in
|
||||
try
|
||||
List.assoc name ps.ps_crcs
|
||||
with Not_found ->
|
||||
assert false
|
||||
|
||||
(* Return the list of imported interfaces with their CRCs *)
|
||||
|
||||
let imported_units() =
|
||||
|
|
|
@ -87,6 +87,10 @@ val read_signature: string -> string -> signature
|
|||
val save_signature: signature -> string -> string -> unit
|
||||
(* Arguments: signature, module name, file name. *)
|
||||
|
||||
(* Return the CRC of the interface of the given compilation unit *)
|
||||
|
||||
val crc_of_unit: string -> Digest.t
|
||||
|
||||
(* Return the set of compilation units imported, with their CRC *)
|
||||
|
||||
val imported_units: unit -> (string * Digest.t) list
|
||||
|
|
Loading…
Reference in New Issue