From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lNe-000536-K0 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:23:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2lNH-0005bE-B6 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:23:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2lNH-0005b7-34 for qemu-devel@nongnu.org; Wed, 29 Feb 2012 10:23:27 -0500 Message-ID: <4F4E42E8.8060003@redhat.com> Date: Wed, 29 Feb 2012 16:23:20 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1330522650-15357-1-git-send-email-pbonzini@redhat.com> <1330522650-15357-4-git-send-email-pbonzini@redhat.com> <4F4E3559.3010801@redhat.com> <20120229120842.6866b559@doriath.home> In-Reply-To: <20120229120842.6866b559@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/6] rename blockdev-group-snapshot-sync List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Kevin Wolf , Stefan Hajnoczi , Jeff Cody , qemu-devel , Federico Simoncelli , Eric Blake Il 29/02/2012 16:08, Luiz Capitulino ha scritto: >> > >> > but it can just be omitted, I wasn't sure of how QAPI handled optionals. > Do you now? Perhaps not. :) > All optionals will be accompanied of a 'bool has_OPTIONAL_NAME', this bool > will be true if the optional has been passed by the caller/client or false > otherwise (in which case you shouldn't trust it). My understanding was that in this case I can trust the value to be all-zeros (zero, false, 0.0, NULL), at least in the context of QAPI. The QmpInputVisitor uses g_malloc0. Paolo