The original code is not so bad now that the comments are gone but this is
still a bit cleaner.
No change in the generated code.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
("bootloader_args", libxl_string_list),
("cmdline", string),
("ramdisk", libxl_file_reference),
- ("features", string, True),
+ ("features", string, {'const': True}),
# Use host's E820 for PCI passthrough.
("e820_host", bool),
])),
self.fields = []
for f in fields:
- # (name, type[, const=False])
+ # (name, type[, {kw args}])
if len(f) == 2:
n,t = f
- const = False
+ kw = {}
elif len(f) == 3:
- n,t,const = f
+ n,t,kw = f
else:
raise ValueError
if n is None:
raise ValueError
- self.fields.append(Field(t,n,const=const))
+ self.fields.append(Field(t,n,**kw))
# Returns a tuple (stem, field-expr)
#