libxl: ocaml: fix the handling of enums in the bindings generator

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: David Scott <dave.scott@eu.citrix.com>
This commit is contained in:
Rob Hoes authored and Ian Campbell committed 2013-11-11 15:39:39 +00:00
1 parent cd5897bdda
commit 127229b9c0
1 file changed
+1 -1
+1 -1
View File
@@ -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 += "}"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.