From: Ian Campbell Subject: Re: [PATCH 11/20] libxl: Introduce some convenience macros Date: Tue, 20 Mar 2012 16:44:51 +0000 Message-ID: <1332261891.9223.368.camel@zakaz.uk.xensource.com> References: <1331915215-10477-1-git-send-email-ian.jackson@eu.citrix.com> <1331915215-10477-12-git-send-email-ian.jackson@eu.citrix.com> <1332243472.9223.221.camel@zakaz.uk.xensource.com> <20328.45746.674479.286283@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20328.45746.674479.286283@mariner.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 Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-03-20 at 16:39 +0000, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH 11/20] libxl: Introduce some convenience macros"): > > On Fri, 2012-03-16 at 16:26 +0000, Ian Jackson wrote: > > > We introduce: > > > *GCNEW( *var); > > > *GCNEW_ARRAY( *var, ssize_t nmemb); > > > *GCREALLOC_ARRAY( *var, size_t nmemb); > > > char *GCSPRINTF(const char *fmt, ...); > > > void LOG(, const char *fmt, ...); > > > void LOGE(, const char *fmt, ...); > > > void LOGEV(, int errnoval, const char *fmt, ...); > > > all of which expect, in the calling context, > > > libxl__gc *gc; > > > > All of these get used later in the series? > > Many of them do. I'm not sure I use all of the LOG* family but > they're orthogonally necessary. Makes sense. > I supplied GCREALLOC_ARRAY because it seemed to fit in with the family > which had malloc and an array malloc. It doesn't have a caller yet > even in my tip; there's a potential call site in libxl_qmp.c but if > that's not enough to justify it I can take it out for now. Might as well keep it now you've written it. Thanks, Ian.