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/
Home Products Support Community News


[Xen-devel] [PATCH 0 of 4] [V2] libxl: Add enumeration type to IDL

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 0 of 4] [V2] libxl: Add enumeration type to IDL
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 31 Mar 2011 12:38:09 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 31 Mar 2011 04:39:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
As part of this I namespace some enum values, firstly within the
LIBXL_ namespace (which is clearly a good idea) but secondly to
namespace the values to within their respective typename, which is
less clearly of benefit. It makes the IDL for enumerations somewhat
cleaner but I'm not totally wedded to it -- opinions welcome.

Changes since first version:

  - Use typedef enum FOO { } FOO idiom which allows existing users of
    "enum FOO xxx;" to continue working.

  - Add libxl_compat.h which defines the old names in an attempt to
    retain API (but not ABI) compatibility. By default all previous
    APIs will be exposed. Not sure if it makes more sense to require
    users to specify which they want.

Xen-devel mailing list