From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH RFC 3/9] libxl_internal: make JSON_* types or-able Date: Tue, 15 Apr 2014 10:22:01 +0100 Message-ID: <20140415092201.GH3635@zion.uk.xensource.com> References: <1397144422-18906-1-git-send-email-wei.liu2@citrix.com> <1397144422-18906-5-git-send-email-wei.liu2@citrix.com> <1397494983.7802.28.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1397494983.7802.28.camel@dagon.hellion.org.uk> 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: ian.jackson@eu.citrix.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Apr 14, 2014 at 06:03:03PM +0100, Ian Campbell wrote: > On Thu, 2014-04-10 at 16:40 +0100, Wei Liu wrote: > > Libxl can generate number as type JSON_INTEGER, JSON_DOUBLE or > > JSON_NUMBER, > > Those are three distinct types, right? Rather than NUMBER being the > union of INTERGERs and DOUBLEs? > Yes. They are distinct types. > > string as type JSON_STRING or JSON_NULL (if string is > > null). > > > > So make JSON_* type or-able > > I think the phrase you want is "make FOO a bit-field". > > > + JSON_ANY = (1 << 8) > > Is ANY here meaning "Any of the others" or is it a specific JSON type? > If the former then should this be 0xff? (or whatever mask achieves the > aim of matching all types) > It means "any of the others". I will make it a mask. Wei.