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 07 of 17] [rpc-light] Add some basic RPC int functions

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 07 of 17] [rpc-light] Add some basic RPC int functions
From: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>
Date: Fri, 8 Jan 2010 13:49:20 +0000
Delivery-date: Fri, 08 Jan 2010 05:50:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1262958553@steel>
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>
# Date 1262958466 0
# Node ID 90fd186e17ef6bc1193681c157a6fa683be7b668
# Parent  45bd84d8701763d0e13863113cf6c3e9f2135063
[rpc-light] Add some basic RPC int functions.

This patch adds rpc_of_unit and unit_of_rpc

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@xxxxxxxxxx>

diff -r 45bd84d87017 -r 90fd186e17ef rpc-light/rpc.ml
--- a/rpc-light/rpc.ml  Fri Jan 08 13:47:46 2010 +0000
+++ b/rpc-light/rpc.ml  Fri Jan 08 13:47:46 2010 +0000
@@ -47,6 +47,7 @@
 let rpc_of_bool b = Bool b
 let rpc_of_float f = Float f
 let rpc_of_string s = String s
+let rpc_of_unit () = Null
 
 let t_of_rpc x = x
 let int64_of_rpc = function
@@ -67,6 +68,7 @@
        | String s -> float_of_string s
        | _ -> failwith "float_of_rpc"
 let string_of_rpc = function String s -> s | _ -> failwith "string_of_rpc"
+let unit_of_rpc = function Null -> () | _ -> failwith "unit_of_rpc"
 
 type callback = string list -> t -> unit
 
diff -r 45bd84d87017 -r 90fd186e17ef rpc-light/rpc.mli
--- a/rpc-light/rpc.mli Fri Jan 08 13:47:46 2010 +0000
+++ b/rpc-light/rpc.mli Fri Jan 08 13:47:46 2010 +0000
@@ -48,6 +48,9 @@
 val t_of_rpc : t -> t
 val rpc_of_t : t -> t
 
+val unit_of_rpc : t -> unit
+val rpc_of_unit : unit -> t
+
 (** {2 Calls} *)
 
 type callback = string list -> t -> unit
2 files changed, 5 insertions(+)
rpc-light/rpc.ml  |    2 ++
rpc-light/rpc.mli |    3 +++


Attachment: xen-api-libs.hg-17.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>