aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRob Hoes <rob.hoes@citrix.com>2013-08-22 11:50:53 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-09-10 11:44:02 +0100
commiteb786f709249666e1f7364706f94be1a6c4e04da (patch)
treeb585abca6ec1cf052bc7d004d7daee1ef701fab7 /tools
parent166bb0fe37f3b49c4825c4dce1e33251c9b7c784 (diff)
downloadxen-eb786f709249666e1f7364706f94be1a6c4e04da.tar.gz
xen-eb786f709249666e1f7364706f94be1a6c4e04da.tar.bz2
xen-eb786f709249666e1f7364706f94be1a6c4e04da.zip
libxl: ocaml: fix code intended to output comments before definitions
I'm not sure how useful these comments actually are but erred on the side of fixing rather than removing. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Rob Hoes <rob.hoes@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/ocaml/libs/xl/genwrap.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/ocaml/libs/xl/genwrap.py b/tools/ocaml/libs/xl/genwrap.py
index ea978bf697..575721818c 100644
--- a/tools/ocaml/libs/xl/genwrap.py
+++ b/tools/ocaml/libs/xl/genwrap.py
@@ -79,12 +79,14 @@ def gen_ocaml_ml(ty, interface, indent=""):
s = ("""(* %s interface *)\n""" % ty.typename)
else:
s = ("""(* %s implementation *)\n""" % ty.typename)
+
if isinstance(ty, idl.Enumeration):
- s = "type %s = \n" % ty.rawname
+ s += "type %s = \n" % ty.rawname
for v in ty.values:
s += "\t | %s\n" % v.rawname
elif isinstance(ty, idl.Aggregate):
- s = ""
+ s += ""
+
if ty.typename is None:
raise NotImplementedError("%s has no typename" % type(ty))
else: