From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: Re: [PATCH] libxl: unconst the event argument to the event_occurs hook. Date: Mon, 29 Apr 2013 22:24:27 -0600 Message-ID: <517F477B.6090503@suse.com> References: <1366976544-3428-1-git-send-email-ian.campbell@citrix.com> <517AF031.4070004@suse.com> <1367223373.3142.189.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1367223373.3142.189.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "George.Dunlap@citix.com" , Ian Jackson , Rob Hoes , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell wrote: >>> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h >>> index 25efa76..ef96bce 100644 >>> --- a/tools/libxl/libxl.h >>> +++ b/tools/libxl/libxl.h >>> @@ -273,9 +273,9 @@ >>> #include >>> #include <_libxl_list.h> >>> >>> -/* API compatibility. Only 0x040200 is supported at this time. */ >>> +/* API compatibility. */ >>> #ifdef LIBXL_API_VERSION >>> -#if LIBXL_API_VERSION != 0x040200 >>> +#if LIBXL_API_VERSION != 0x040200 && LIBXL_API_VERSION != 0x040300 >>> #error Unknown LIBXL_API_VERSION >>> #endif >>> #endif >>> >>> >> Should this hunk be in a separate patch? It seems to be introducing a >> new API version :). >> > > I suppose it could be, or we could argue that this patch is introducing > the first user of this API version? > Ok. > >>> @@ -308,6 +308,16 @@ >>> */ >>> #define LIBXL_HAVE_DEVICE_BACKEND_DOMNAME 1 >>> >>> +/* >>> + * LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG >>> + * >>> + * This argument was erroneously "const" in the 4.2 release despite >>> + * the requirement for the callback to free the event. >>> + */ >>> +#if LIBXL_API_VERSION != 0x040200 >>> > > Looking at this again today this happens to be true if LIBXL_API_VERSION > is undefined but I wonder if we ought to explicitly define > LIBXL_API_VERSION to 0xffffff if the user doesn't supply it? > Ah, good point. But setting LIBXL_API_VERSION to 0xffffffff if the app doesn't supply it means the app, which e.g. built fine on 4.2, would no longer compile on 4.3 right? Regards, Jim