]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: ocaml: fix code intended to output comments before definitions
authorRob Hoes <rob.hoes@citrix.com>
Thu, 22 Aug 2013 10:50:53 +0000 (11:50 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 10 Sep 2013 10:44:02 +0000 (11:44 +0100)
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>
tools/ocaml/libs/xl/genwrap.py

index ea978bf697ed77ab4fa89fc127935c563153f132..575721818c60f28bdc370c4e698def7e22bd2b2c 100644 (file)
@@ -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: