WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] [stdext] Add the function Bigbuffer.append_string : Bi

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] [stdext] Add the function Bigbuffer.append_string : Bigbuffer.t -> string -> unit
From: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
Date: Fri, 8 Jan 2010 13:30:23 +0000
Delivery-date: Fri, 08 Jan 2010 05:32:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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
Description: Text document

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] [stdext] Add the function Bigbuffer.append_string : Bigbuffer.t -> string -> unit, Thomas Gazagnaire <=