[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH] [stdext] Add the function Bigbuffer.append_string : Bigbuffer.t -> string -> unit
# HG changeset patch # User Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx> [stdext] Add the function Bigbuffer.append_string : Bigbuffer.t -> string -> unit Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx> diff -r 695ac5c8e23f stdext/bigbuffer.ml --- a/stdext/bigbuffer.ml Tue Dec 22 15:16:05 2009 +0000 +++ b/stdext/bigbuffer.ml Wed Jan 06 14:56:32 2010 +0000 @@ -59,6 +59,8 @@ ); () +let append_string b s = append_substring b s 0 (String.length s) + let to_fct bigbuf f = let array_offset = Int64.to_int (Int64.div bigbuf.index (Int64.of_int cell_size)) in let cell_offset = Int64.to_int (Int64.rem bigbuf.index (Int64.of_int cell_size)) in diff -r 695ac5c8e23f stdext/bigbuffer.mli --- a/stdext/bigbuffer.mli Tue Dec 22 15:16:05 2009 +0000 +++ b/stdext/bigbuffer.mli Wed Jan 06 14:56:32 2010 +0000 @@ -16,6 +16,10 @@ val length : t -> int64 val get : t -> int64 -> char val append_substring : t -> string -> int -> int -> unit + +(** [append_string b s] appends the string [x] to the big buffer [b] *) +val append_string : t -> string -> unit + val to_fct : t -> (string -> unit) -> unit val to_string : t -> string val to_stream : t -> out_channel -> unit Attachment:
api-libs-bigbuffer-add-append-string-fn _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |