[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools/ocaml: register the ocaml exception so it can be used at the C level.



# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1279045653 -3600
# Node ID febb1a705463f33760a670e8ec7e0daa25c59673
# Parent  8429a8a23241e9cd4a0383181a81d085bb43f8f3
tools/ocaml: register the ocaml exception so it can be used at the C level.

Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/ocaml/libs/xl/xl.ml  |    4 ++++
 tools/ocaml/libs/xl/xl.mli |    2 ++
 2 files changed, 6 insertions(+)

diff -r 8429a8a23241 -r febb1a705463 tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Tue Jul 13 19:08:48 2010 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Tue Jul 13 19:27:33 2010 +0100
@@ -13,6 +13,8 @@
  * GNU Lesser General Public License for more details.
  *)
 
+exception Error of string
+
 type create_info =
 {
        hvm : bool;
@@ -207,3 +209,5 @@ external send_trigger : domid -> string 
 external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger"
 external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq"
 external send_debug_keys : domid -> string -> unit = "stub_xl_send_debug_keys"
+
+let _ = Callback.register_exception "xl.error" (Error "register_callback")
diff -r 8429a8a23241 -r febb1a705463 tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli        Tue Jul 13 19:08:48 2010 +0100
+++ b/tools/ocaml/libs/xl/xl.mli        Tue Jul 13 19:27:33 2010 +0100
@@ -13,6 +13,8 @@
  * GNU Lesser General Public License for more details.
  *)
 
+exception Error of string
+
 type create_info =
 {
        hvm : bool;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.