From: Ian Jackson Subject: Re: [PATCH 11/20] libxl: Introduce some convenience macros Date: Tue, 20 Mar 2012 16:39:14 +0000 Message-ID: <20328.45746.674479.286283@mariner.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1332243472.9223.221.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: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org 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. 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. Ian.