[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [PATCH V6 1/3] libxl: Introduce libxl_internal_types.idl.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.