[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v6 12/18] libxl IDL: generate code to parse libxl__json_object to libxl_FOO struct
On Mon, 2014-06-09 at 13:43 +0100, Wei Liu wrote: > libxl_FOO_parse_json functions are generated. > > Note that these functions are used to parse libxl__json_object to > libxl__FOO struct. They don't consume JSON string. > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> One small thought: > + for f in [f for f in ty.fields if not f.const and not > f.type.private]: > + saved_var_name = "saved_%s" % f.name > + s += "{\n" > + s += " const libxl__json_object *%s = NULL;\n" % > saved_var_name > + s += " %s = x;\n" % saved_var_name You could do the assign and the declaration on one line. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |