From: Ian Campbell Subject: Re: [PATCH RFC 4/9] libxl_internal: introduce libxl__json_object_is_{null, number, double} Date: Tue, 15 Apr 2014 10:35:12 +0100 Message-ID: <1397554512.24638.34.camel@kazak.uk.xensource.com> References: <1397144422-18906-1-git-send-email-wei.liu2@citrix.com> <1397144422-18906-6-git-send-email-wei.liu2@citrix.com> <1397495067.7802.29.camel@dagon.hellion.org.uk> <20140415092956.GI3635@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140415092956.GI3635@zion.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: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-04-15 at 10:29 +0100, Wei Liu wrote: > On Mon, Apr 14, 2014 at 06:04:27PM +0100, Ian Campbell wrote: > > On Thu, 2014-04-10 at 16:40 +0100, Wei Liu wrote: > > > ... which return true if json object is valid and of type > > > JSON_{NULL,NUMBER,DOUBLE}. > > > > > > Signed-off-by: Wei Liu > > > > Acked-by: Ian Campbell > > > > But... > > > +static inline bool libxl__json_object_is_null(const libxl__json_object *o) > > > +{ > > > + return o != NULL && o->type == JSON_NULL; > > > > Shouldn't these (new and existing) use the bit field stuff you just > > introduced? > > > > No, [...] Makes sense, thanks for the explanation. Ian.