WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH V6 1/3] libxl: Introduce libxl_internal_types.idl.
From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Date: Fri, 1 Jul 2011 11:22:48 +0100
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 01 Jul 2011 03:23:48 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=ROOlJ1Dd3qqKBxz11ryejPs+GcSkesQlafvgMagysVA=; b=LtW9DzEJ6JX5Hb81Ad6dY65s2J1rFN+RgeQnnR2BalUC3czSx16IM0qTJU/x2JGhTn XFRR4lOFR0hVXWrxf6WJ0jF2zCPlM/Atang/btgOcociXxNsn7iQ+/Ean4znhCTW6fJN 8J9+GxjITccbvMrvqF4nB+bTrqX2leH5Oa9UU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1309507416.634.6.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1309455045-3062-1-git-send-email-anthony.perard@xxxxxxxxxx> <1309455045-3062-2-git-send-email-anthony.perard@xxxxxxxxxx> <1309507416.634.6.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>