From: Rob Hoes Subject: [PATCH v4 14/27] libxl: ocaml: fix the handling of enums in the bindings generator Date: Wed, 6 Nov 2013 17:49:52 +0000 Message-ID: <1383760205-20397-15-git-send-email-rob.hoes@citrix.com> References: <1383760205-20397-1-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383760205-20397-1-git-send-email-rob.hoes@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: ian.jackson@eu.citrix.com, ian.campbell@citrix.com, Rob Hoes List-Id: xen-devel@lists.xenproject.org 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 4206c87..5a3fd8d 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 += "}" -- 1.7.10.4