From 127229b9c02419cc3cbdfd1a100a62cce8cc734f Mon Sep 17 00:00:00 2001 From: Rob Hoes Date: Wed, 6 Nov 2013 17:49:52 +0000 Subject: [PATCH] libxl: ocaml: fix the handling of enums in the bindings generator Signed-off-by: Rob Hoes Acked-by: Ian Campbell Acked-by: Ian Jackson Acked-by: David Scott --- tools/ocaml/libs/xl/genwrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ocaml/libs/xl/genwrap.py b/tools/ocaml/libs/xl/genwrap.py index 4206c87c27..5a3fd8d1eb 100644 --- a/tools/ocaml/libs/xl/genwrap.py +++ b/tools/ocaml/libs/xl/genwrap.py @@ -340,7 +340,7 @@ def ocaml_Val(ty, o, c, indent="", parent = None): n = 0 s += "switch(%s) {\n" % c for e in ty.values: - s += " case %s: %s = Int_val(%d); break;\n" % (e.name, o, n) + s += " case %s: %s = Val_int(%d); break;\n" % (e.name, o, n) n += 1 s += " default: failwith_xl(ERROR_FAIL, \"cannot convert value from %s\"); break;\n" % ty.typename s += "}" -- 2.30.2