diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 1999-11-30 16:07:38 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 1999-11-30 16:07:38 +0000 |
commit | 296fc0547052da47bf0e983cab1ce173fa1e8882 (patch) | |
tree | 27f621f1e06d4f6493c88993969c4638861390d7 /stdlib/marshal.mli | |
parent | ca0b21c5adbe660a52e5a9dfe1dda16985fe5f7c (diff) | |
download | ocaml-296fc0547052da47bf0e983cab1ce173fa1e8882.tar.gz |
Merge olabl branch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/marshal.mli')
-rw-r--r-- | stdlib/marshal.mli | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/stdlib/marshal.mli b/stdlib/marshal.mli index 25e140d92c..d55f175e55 100644 --- a/stdlib/marshal.mli +++ b/stdlib/marshal.mli @@ -47,7 +47,7 @@ type extern_flags = | Closures (* Send function closures *) (* The flags to the [Marshal.to_*] functions below. *) -external to_channel: out_channel -> 'a -> extern_flags list -> unit +external to_channel: out_channel -> data:'a -> flags:extern_flags list -> unit = "output_value" (* [Marshal.to_channel chan v flags] writes the representation of [v] on channel [chan]. The [flags] argument is a @@ -78,14 +78,15 @@ external to_channel: out_channel -> 'a -> extern_flags list -> unit at un-marshaling time, using an MD5 digest of the code transmitted along with the code position.) *) -external to_string: 'a -> extern_flags list -> string +external to_string: data:'a -> flags:extern_flags list -> string = "output_value_to_string" (* [Marshal.to_string v flags] returns a string containing the representation of [v] as a sequence of bytes. The [flags] argument has the same meaning as for [Marshal.to_channel]. *) -val to_buffer: string -> int -> int -> 'a -> extern_flags list -> int +val to_buffer: string -> pos:int -> len:int -> + data:'a -> flags:extern_flags list -> int (* [Marshal.to_buffer buff ofs len v flags] marshals the value [v], storing its byte representation in the string [buff], starting at character number [ofs], and writing at most @@ -100,15 +101,15 @@ external from_channel: in_channel -> 'a = "input_value" one of the [Marshal.to_*] functions, and reconstructs and returns the corresponding value.*) -val from_string: string -> int -> 'a +val from_string: string -> pos:int -> 'a (* [Marshal.from_string buff ofs] unmarshals a structured value like [Marshal.from_channel] does, except that the byte representation is not read from a channel, but taken from the string [buff], starting at position [ofs]. *) val header_size : int -val data_size : string -> int -> int -val total_size : string -> int -> int +val data_size : string -> pos:int -> int +val total_size : string -> pos:int -> int (* The bytes representing a marshaled value are composed of a fixed-size header and a variable-sized data part, whose size can be determined from the header. |