[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen master] libxl/gentypes.py: don't generate JSON for private type(s)
From: patchbot () xen ! org
Date: 2014-04-18 8:44:44
Message-ID: E1Wb4Pc-0003Nl-EY () xenbits ! xen ! org
[Download RAW message or body]
commit 172c47d1c85ac1f54805f04dd6bcd62bb35fa3a4
Author: Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:26:31 2014 +0100
Commit: Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:36 2014 +0100
libxl/gentypes.py: don't generate JSON for private type(s)
Private types are only useful inside libxl. They don't have a valid JSON
generation function by default.
Currently there's only one private type, that's libxl_ev_link. Not
skipping this field causes testidl to fail as the code generated for
this type is NULL.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
tools/libxl/gentypes.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index be06257..1a3b91c 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -226,7 +226,7 @@ def libxl_C_type_gen_json(ty, v, indent = " ", parent = None):
s += "s = yajl_gen_map_open(hand);\n"
s += "if (s != yajl_gen_status_ok)\n"
s += " goto out;\n"
- for f in [f for f in ty.fields if not f.const]:
+ for f in [f for f in ty.fields if not f.const and not f.type.private]:
(nparent,fexpr) = ty.member(v, f, parent is None)
s += "s = yajl_gen_string(hand, (const unsigned char *)\"%s\", \
sizeof(\"%s\")-1);\n" % (f.name, f.name) s += "if (s != yajl_gen_status_ok)\n"
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic