diff --git a/otherlibs/dynlink/dynlink.ml b/otherlibs/dynlink/dynlink.ml index fd2cc56ac..2d71d077c 100644 --- a/otherlibs/dynlink/dynlink.ml +++ b/otherlibs/dynlink/dynlink.ml @@ -148,6 +148,15 @@ let loadfile file_name = with exc -> close_in ic; raise exc +let loadfile_private file_name = + let initial_symtable = Symtable.current_state() in + try + loadfile file_name; + Symtable.hide_additions initial_symtable + with exn -> + Symtable.hide_additions initial_symtable; + raise exn + (* Error report *) let error_message = function diff --git a/otherlibs/dynlink/dynlink.mli b/otherlibs/dynlink/dynlink.mli index bb8bc4a18..67ada5c0c 100644 --- a/otherlibs/dynlink/dynlink.mli +++ b/otherlibs/dynlink/dynlink.mli @@ -44,7 +44,7 @@ val add_available_units : (string * Digest.t) list -> unit for each unit. This way, the [.cmi] interface files need not be available at run-time. The digests can be extracted from [.cmi] files using the [extract_crc] program installed in the - Objective Caml standard library directory. *) + Objective Caml standard library directory. *) val clear_available_units : unit -> unit (* Clear the list of compilation units accessible to dynamically-linked programs. *)