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] int64 operators

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] int64 operators
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 23 Aug 2010 13:58:48 +0100
Delivery-date: Mon, 23 Aug 2010 06:19:23 -0700
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
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
# Date 1282568307 -3600
# Node ID d6b47ef01193698a7c17d2ef0ab6feaec5eeedf5
# Parent  630c51dcfc241050ce34303920291b837671cd42
Adds an int64ext module. This module includes a set of commonly-used operators 
that work with the int64 data type.

Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>

diff -r 630c51dcfc24 -r d6b47ef01193 stdext/Makefile
--- a/stdext/Makefile   Mon Aug 23 13:58:07 2010 +0100
+++ b/stdext/Makefile   Mon Aug 23 13:58:27 2010 +0100
@@ -30,6 +30,7 @@
        hashtblext \
        pervasiveext \
        threadext \
+       int64ext \
        ring \
        qring \
        fring \
diff -r 630c51dcfc24 -r d6b47ef01193 stdext/int64ext.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/stdext/int64ext.ml        Mon Aug 23 13:58:27 2010 +0100
@@ -0,0 +1,17 @@
+module Int64 = struct
+
+       module Operators = struct
+
+               let ( +++ ) = Int64.add
+               let ( --- ) = Int64.sub
+               let ( *** ) = Int64.mul
+               let ( /// ) = Int64.div
+               let ( &&& ) = Int64.logand
+               let ( ||| ) = Int64.logor
+               let ( <<< ) = Int64.shift_left
+               let ( >>> ) = Int64.shift_right_logical
+               let ( !!! ) = Int64.lognot
+
+       end
+
+end
diff -r 630c51dcfc24 -r d6b47ef01193 stdext/int64ext.mli
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/stdext/int64ext.mli       Mon Aug 23 13:58:27 2010 +0100
@@ -0,0 +1,17 @@
+module Int64 : sig
+
+       module Operators : sig
+
+               val ( +++ ) : int64 -> int64 -> int64
+               val ( --- ) : int64 -> int64 -> int64
+               val ( *** ) : int64 -> int64 -> int64
+               val ( /// ) : int64 -> int64 -> int64
+               val ( &&& ) : int64 -> int64 -> int64
+               val ( ||| ) : int64 -> int64 -> int64
+               val ( <<< ) : int64 -> int -> int64
+               val ( >>> ) : int64 -> int -> int64
+               val ( !!! ) : int64 -> int64
+
+       end
+
+end
\ No newline at end of file
diff -r 630c51dcfc24 -r d6b47ef01193 xapi-libs.spec
--- a/xapi-libs.spec    Mon Aug 23 13:58:07 2010 +0100
+++ b/xapi-libs.spec    Mon Aug 23 13:58:27 2010 +0100
@@ -201,6 +201,8 @@
    /usr/lib/ocaml/stdext/gzip.cmx
    /usr/lib/ocaml/stdext/hashtblext.cmi
    /usr/lib/ocaml/stdext/hashtblext.cmx
+   /usr/lib/ocaml/stdext/int64ext.cmi
+   /usr/lib/ocaml/stdext/int64ext.cmx
    /usr/lib/ocaml/stdext/libstdext_stubs.a
    /usr/lib/ocaml/stdext/lazyList.cmi
    /usr/lib/ocaml/stdext/lazyList.cmx
 stdext/Makefile     |   1 +
 stdext/int64ext.ml  |  17 +++++++++++++++++
 stdext/int64ext.mli |  17 +++++++++++++++++
 xapi-libs.spec      |   2 ++
 4 files changed, 37 insertions(+), 0 deletions(-)


Attachment: xen-api-libs.hg.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>
  • [Xen-API] [PATCH] int64 operators, David Scott <=