From: Ian Campbell Subject: Re: [PATCH V4 10/24] libxl_json: allow basic JSON type objects generation Date: Tue, 6 May 2014 14:02:17 +0100 Message-ID: <1399381337.3014.123.camel@kazak.uk.xensource.com> References: <1398949101-23320-1-git-send-email-wei.liu2@citrix.com> <1398949101-23320-11-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: <1398949101-23320-11-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: Anthony Perard , ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org CCing Anthony. On Thu, 2014-05-01 at 13:58 +0100, Wei Liu wrote: > The original logic is that basic JSON types (number, string and null) > must be an element of JSON map or array. This assumption doesn't hold > true anymore when we need to return basic JSON types. > > Returning basic JSON types is required for parsing number, string and > null objects back into libxl__json_object. > > Signed-off-by: Wei Liu I think passing (ctx->gc, obj, ctx) as arguments is a bit odd, but I can see how it makes sense from the PoV of the conventions here (and given that the ctx is a libxl__yajl_ctx not a libxl__ctx): Acked-by: Ian Campbell