|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 5/9] libxl IDL: generate code to parse libxl__json_object to libxl_FOO struct
On Tue, 2014-06-17 at 10:32 +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.
>
> The new function definitions are generated to new header files called
> __libxl_types_*_json_internal.h so that they don't contaiminate public
> header.
"contaminate".
I'm a bit confused what is going into this file. It seems to be these
two:
f.write("int %s_parse_json(libxl__gc *gc, const libxl__json_object *%s,
%s)\n" % (ty.typename,"o",ty.make_arg("p", passby=idl.PASS_BY_REFERENCE)))
f.write("int %s_from_json(libxl_ctx *ctx, %s, const char *s)\n" %
(ty.typename, ty.make_arg("p", passby=idl.PASS_BY_REFERENCE)))
The first looks internal (it takes const libxl__json_object which is
internal) but it is in the libxl_ namespace.
The second looks like it should be public in _libxl_json.h, shouldn't
it?
I think you need to put the first function into a new
_libxl_types_*_internal.h (no need to make it specific to internal json
functions), and the second into just regular _libxl_types.h (it doesn't
require the application to opt into using yajl so it doesn't have to go
into _libxl_types_json.h)
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |