diff options
author | Pierre Weis <Pierre.Weis@inria.fr> | 2015-10-29 18:09:09 +0100 |
---|---|---|
committer | Pierre Weis <Pierre.Weis@inria.fr> | 2015-10-29 18:09:09 +0100 |
commit | fbcec250c363acb647d967cc3a53e58ef1c09e0e (patch) | |
tree | e1261d9db79922d1f753976c1a5e672888af7905 /tools | |
parent | bf56ce3c0acfae21e4bc8f6907d14722f5eed8f0 (diff) | |
download | ocaml-fbcec250c363acb647d967cc3a53e58ef1c09e0e.tar.gz |
Do not use fscanf that will be deprecated ASAP.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/objinfo.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/objinfo.ml b/tools/objinfo.ml index 37a03b3427..5faa42de9f 100644 --- a/tools/objinfo.ml +++ b/tools/objinfo.ml @@ -199,13 +199,13 @@ let read_dyn_header filename ic = (Filename.quote filename) tempfile) in if rc <> 0 then failwith "cannot read"; - let tc = open_in tempfile in + let tc = Scanf.Scanning.from_file tempfile in try_finally (fun () -> - let ofs = Scanf.fscanf tc "%Ld" (fun x -> x) in + let ofs = Scanf.bscanf tc "%Ld" (fun x -> x) in LargeFile.seek_in ic ofs; Some(input_value ic : dynheader)) - (fun () -> close_in tc)) + (fun () -> Scanf.Scanning.close_in tc)) (fun () -> remove_file tempfile) with Failure _ | Sys_error _ -> None |