|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: use keyword arguments for field definitions in aggregate types.
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1328020797 0
# Node ID 1a93393b700209a5863a49961eb802e6796dd661
# Parent 996c95a3e7e01f85186e5ac02e3070bc442ff580
libxl: use keyword arguments for field definitions in aggregate types.
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@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
diff -r 996c95a3e7e0 -r 1a93393b7002 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl Tue Jan 31 14:39:57 2012 +0000
+++ b/tools/libxl/libxl_types.idl Tue Jan 31 14:39:57 2012 +0000
@@ -192,7 +192,7 @@
("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),
])),
diff -r 996c95a3e7e0 -r 1a93393b7002 tools/libxl/libxltypes.py
--- a/tools/libxl/libxltypes.py Tue Jan 31 14:39:57 2012 +0000
+++ b/tools/libxl/libxltypes.py Tue Jan 31 14:39:57 2012 +0000
@@ -154,17 +154,17 @@
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)
#
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |