From: Ian Campbell Subject: Re: [PATCH RFC V2 03/10] libxl_internal: make JSON_* types bit-field Date: Tue, 22 Apr 2014 15:50:22 +0100 Message-ID: <1398178222.4880.35.camel@kazak.uk.xensource.com> References: <1397733191-31892-1-git-send-email-wei.liu2@citrix.com> <1397733191-31892-4-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397733191-31892-4-git-send-email-wei.liu2@citrix.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 Thu, 2014-04-17 at 12:13 +0100, Wei Liu wrote: > Libxl can generate number as type JSON_INTEGER, JSON_DOUBLE or > JSON_NUMBER, string as type JSON_STRING or JSON_NULL (if string is > null). > > So make JSON_* type a bit-field and use it in libxl__json_map_get. This is > useful when parsing a libxl__json_object to libxl_FOO struct. We can > enforce type checking on libxl__json_object in an easy way. > > Signed-off-by: Wei Liu Acked-by: Ian Campbell Although, minor nit, "types a bit-field" in the subject would be better.