]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
Adds an int64ext module. This module includes a set of commonly-used operators that...
authorJonathan Knowles <jonathan.knowles@eu.citrix.com>
Mon, 23 Aug 2010 12:58:27 +0000 (13:58 +0100)
committerJonathan Knowles <jonathan.knowles@eu.citrix.com>
Mon, 23 Aug 2010 12:58:27 +0000 (13:58 +0100)
Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
stdext/Makefile
stdext/int64ext.ml [new file with mode: 0644]
stdext/int64ext.mli [new file with mode: 0644]
xapi-libs.spec

index 09952d84f0050b6d842bf2bb606002d1c7267d6a..444bd1942452f6df8c4e41f402d16d23563e5000 100644 (file)
@@ -30,6 +30,7 @@ STDEXT_OBJS = \
        hashtblext \
        pervasiveext \
        threadext \
+       int64ext \
        ring \
        qring \
        fring \
diff --git a/stdext/int64ext.ml b/stdext/int64ext.ml
new file mode 100644 (file)
index 0000000..27c3442
--- /dev/null
@@ -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 --git a/stdext/int64ext.mli b/stdext/int64ext.mli
new file mode 100644 (file)
index 0000000..c8441f5
--- /dev/null
@@ -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
index 73e91370b4d09a2dbe411b0e50fd8830a913d771..2d36f4804211b63a446cffa1e5f52a72c43566a3 100644 (file)
@@ -201,6 +201,8 @@ rm -rf $RPM_BUILD_ROOT
    /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