On Fri, Jul 1, 2011 at 09:03, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> wrote:
> On Thu, 2011-06-30 at 18:30 +0100, Anthony PERARD wrote:
>> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
>> ---
>> tools/libxl/Makefile | 16 +++++++++-------
>> tools/libxl/gentypes.py | 15 ++++++++-------
>> tools/libxl/libxl_internal.h | 1 +
>> tools/libxl/{libxl.idl => libxl_types.idl} | 0
>
> This is going to need changes to at least tools/python/Makefile and
> tools/ocaml/libs/xl/Makefile as well. Probably best to split the rename
> into another patch.
:(, this file is use everywhere. So yes, I will split the patch.
> [...]
>> diff --git a/tools/libxl/libxl_types_internal.idl
>> b/tools/libxl/libxl_types_internal.idl
>> new file mode 100644
>> index 0000000..d993298
>> --- /dev/null
>> +++ b/tools/libxl/libxl_types_internal.idl
>> @@ -0,0 +1,10 @@
>> +
>> +libxl__qmp_message_type = Enumeration("qmp_message_type", [
>> + (1, "QMP"),
>> + (2, "return"),
>> + (3, "error"),
>> + (4, "event"),
>> + (5, "invalid"),
>> + ],
>> + namespace = "libxl__")
>
> I wonder if the IDL infrastructure should export a way to set the
> default namespace? So we'd end up with:
> default_namespace = "libxl__"
>
> libxl__qmp_message_type = Enumeration("...", [....])
> libxl__another_internal_type = Struct(...)
>
> We could use the same in libxl_types.idl and change the default to be no
> namespace, making the whole thing a tiny bit more generic.
>
> I expect that scoping will require the actual syntax to use the module
> e.g.
> libxltypes.default_namespace = "libxl__"
> or maybe a function call is cleaner
> libxltypes.default_namespace("libxl__")
I will try to do that. The .idl files will be much more cleanner after that.
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|