From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US7Q1-0003UT-UZ for qemu-devel@nongnu.org; Tue, 16 Apr 2013 11:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US7Hn-0002Ej-JJ for qemu-devel@nongnu.org; Tue, 16 Apr 2013 10:55:12 -0400 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:34468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US7Hn-0002EN-Ek for qemu-devel@nongnu.org; Tue, 16 Apr 2013 10:55:07 -0400 Received: by mail-qc0-f181.google.com with SMTP id a22so251774qcs.26 for ; Tue, 16 Apr 2013 07:55:07 -0700 (PDT) Sender: fluxion Date: Tue, 16 Apr 2013 09:50:17 -0500 From: mdroth Message-ID: <20130416145017.GA1599@vm> References: <8738urblx3.fsf@fimbulvetr.bsc.es> <20130416084919.GG6308@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130416084919.GG6308@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [qapi] Cannot use list of strings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , Luiz Capitulino , akong@redhat.com, =?iso-8859-1?Q?Llu=EDs?= Vilanova , qemu-devel@nongnu.org On Tue, Apr 16, 2013 at 10:49:19AM +0200, Stefan Hajnoczi wrote: > On Mon, Apr 15, 2013 at 10:04:24PM +0200, Lluís Vilanova wrote: > > Tried using a list of strings as an argument to a command, but the generated > > code references the 'strList' type, which does not exist. > > > > Is a specialized version for "['str']" missing, or should I define my own type > > with a single field of 'str' type? I would say just give that a shot. Stick: typedef struct strList { char *value; struct strList *next; } strList; in include/qapi/visitor.h and see what happens. It's not immediately obvious to me why that wouldn't work, except maybe that sometimes the code generators will special case on CamelCase types, but that shouldn't be too hard to work around if it's an issue. If that works, the same approach can probably be taken for all "native" qapi types: str, bool, [u]int[(8|16|32|64)] > > akong just hit this too. > > I think it's a question for aliguori, luiz, or mdroth. > > Stefan >