[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl/gentypes.py: generate empty map for None field in keyed-union
commit 5c77003b524af15a4a8a9d33ba0f2786f3a31c2b Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Apr 10 16:18:00 2014 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Apr 16 17:06:45 2014 +0100 libxl/gentypes.py: generate empty map for None field in keyed-union Without this the generated JSON is malformed. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/gentypes.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py index 1a3b91c..917e2c2 100644 --- a/tools/libxl/gentypes.py +++ b/tools/libxl/gentypes.py @@ -220,6 +220,13 @@ def libxl_C_type_gen_json(ty, v, indent = " ", parent = None): s += "case %s:\n" % f.enumname if f.type is not None: s += libxl_C_type_gen_json(f.type, fexpr, indent + " ", nparent) + else: + s += " s = yajl_gen_map_open(hand);\n" + s += " if (s != yajl_gen_status_ok)\n" + s += " goto out;\n" + s += " s = yajl_gen_map_close(hand);\n" + s += " if (s != yajl_gen_status_ok)\n" + s += " goto out;\n" s += " break;\n" s += "}\n" elif isinstance(ty, idl.Struct) and (parent is None or ty.json_fn is None): -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |