From: Ian Jackson Subject: Re: [PATCH] libxl: unconst the event argument to the event_occurs hook. [and 1 more messages] Date: Wed, 1 May 2013 11:48:17 +0100 Message-ID: <20864.62193.859832.819808@mariner.uk.xensource.com> References: <1366976544-3428-1-git-send-email-ian.campbell@citrix.com> <517AF031.4070004@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1366976544-3428-1-git-send-email-ian.campbell@citrix.com>, <517AF031.4070004@suse.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: Jim Fehlig , Ian Campbell Cc: "George.Dunlap@citix.com" , Rob Hoes , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("[PATCH] libxl: unconst the event argument to the event_occurs hook."): > The event is supposed to become owned, and therefore freed, by the application > and the const prevents this. > > Unfortunately there is no way to remove the const without breaking existing > callers. The best we can do is use the LIBXL_API_VERSION provisions to remove > the const for callers who wish only to support the 4.3 API and newer. > > Callers who wish to support 4.2 will need to live with casting away the const. > > Signed-off-by: Ian Campbell > Cc: Ian.Jackson@citrix.com > Cc: George.Dunlap@citix.com > Cc: Jim Fehlig > Cc: Rob Hoes Acked-by: Ian Jackson Jim Fehlig writes ("Re: [Xen-devel] [PATCH] libxl: unconst the event argument to the event_occurs hook."): > > -/* 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 ... > Should this hunk be in a separate patch? It seems to be introducing a > new API version :). Certainly not. The actual API actually changes in the rest of the patch. Thanks, Ian.