diff options
author | Jeremie Dimino <jdimino@janestreet.com> | 2016-02-24 17:23:21 +0000 |
---|---|---|
committer | Jeremie Dimino <jdimino@janestreet.com> | 2016-03-01 10:36:24 +0000 |
commit | 86daba0e9093cdff18e75555e05f5fbe44ea7722 (patch) | |
tree | a9322f580dd81a589a406634d305ee557a0c48f6 /toplevel/opttoploop.mli | |
parent | b98461c3f35a3d046940d06054eef874769ee8d7 (diff) | |
download | ocaml-86daba0e9093cdff18e75555e05f5fbe44ea7722.tar.gz |
Add Toploop.override_sys_argv
Diffstat (limited to 'toplevel/opttoploop.mli')
-rw-r--r-- | toplevel/opttoploop.mli | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/toplevel/opttoploop.mli b/toplevel/opttoploop.mli index 3ce4d19108..f234b4f4cf 100644 --- a/toplevel/opttoploop.mli +++ b/toplevel/opttoploop.mli @@ -120,3 +120,13 @@ val read_interactive_input : (string -> bytes -> int -> int * bool) ref (* Hooks for initialization *) val toplevel_startup_hook : (unit -> unit) ref + +(* Misc *) + +val override_sys_argv : string array -> unit +(* [override_sys_argv args] replaces the contents of [Sys.argv] by [args] + and reset [Arg.current] to [0]. + + This is called by [run_script] so that [Sys.argv] represents + "script.ml args..." instead of the full command line: + "ocamlrun unix.cma ... script.ml args...". *) |