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

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

To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH V6 1/3] libxl: Introduce libxl_internal_types.idl.
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Fri, 1 Jul 2011 09:03:36 +0100
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 01 Jul 2011 01:06:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1309455045-3062-2-git-send-email-anthony.perard@xxxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <1309455045-3062-1-git-send-email-anthony.perard@xxxxxxxxxx> <1309455045-3062-2-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

[...]
> 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__")

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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