Received: from eggs.gnu.org ([2001:4830:134:3::10]:33071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAiO3-0001X5-7y for qemu-devel@nongnu.org; Thu, 02 Jul 2015 13:35:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAiNy-0001pp-81 for qemu-devel@nongnu.org; Thu, 02 Jul 2015 13:34:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAiNy-0001pf-2m for qemu-devel@nongnu.org; Thu, 02 Jul 2015 13:34:54 -0400 From: Markus Armbruster References: <2839919cc06b59a7db292c7bae87b4660cc07376.1435064848.git.DirtY.iCE.hu@gmail.com> Date: Thu, 02 Jul 2015 19:34:51 +0200 In-Reply-To: <2839919cc06b59a7db292c7bae87b4660cc07376.1435064848.git.DirtY.iCE.hu@gmail.com> (=?utf-8?B?IkvFkXbDoWfDsywgWm9sdMOhbiIncw==?= message of "Tue, 23 Jun 2015 15:33:00 +0200") Message-ID: <87k2uiqx8k.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/5] qapi: support nested structs in OptsVisitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?S8WRdsOhZ8OzLCBab2x0w6Fu?= Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , Michael Roth "K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n" writes: > The current OptsVisitor flattens the whole structure, if there are same > named fields under different paths the current visitor can't cope with > them (it'll just set the first field, leaving the others unspecified (if > they're optional) or erroring out (if they're required). > > This patch add support for it, by always requiring a complete path in > case of nested structs. Fields in the path are separated by dots, > similar to C structs (without pointers), like `foo.bar'. > > You must provide a full path even in non-ambigous cases. The previous > two commits hopefully ensures that this change doesn't create backward > compatibility problems. > > Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n > > --- > > Rationale for this commit: see these threads > http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg04189.html > http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg04186.html So, despite your flattening work, we still need to parse option strings into nested QAPI types? Can you give examples of the need for such nested QAPI types in configuration? I may have seen them already in your audio patches, but I think having some right here would be useful.