From: mdroth <mdroth@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>,
akong@redhat.com, "Lluís Vilanova" <vilanova@ac.upc.edu>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [qapi] Cannot use list of strings
Date: Tue, 16 Apr 2013 09:50:17 -0500 [thread overview]
Message-ID: <20130416145017.GA1599@vm> (raw)
In-Reply-To: <20130416084919.GG6308@stefanha-thinkpad.redhat.com>
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
>
next prev parent reply other threads:[~2013-04-16 15:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 20:04 [Qemu-devel] [qapi] Cannot use list of strings Lluís Vilanova
2013-04-15 21:07 ` Lluís Vilanova
2013-04-16 8:49 ` Stefan Hajnoczi
2013-04-16 8:54 ` Paolo Bonzini
2013-04-16 10:13 ` Amos Kong
2013-04-16 12:36 ` Eric Blake
2013-04-16 10:46 ` Lluís Vilanova
2013-04-16 14:50 ` mdroth [this message]
2013-04-17 8:33 ` Amos Kong
2013-04-19 5:26 ` [Qemu-devel] [RFC PATCH] qapi: introduce strList and visit_type_strList() (was Re: [qapi] Cannot use list of strings) Amos Kong
2013-04-24 16:08 ` [Qemu-devel] [PATCH v2] qapi: add struct strList and visit_type_strList() Amos Kong
2013-04-24 16:11 ` Paolo Bonzini
2013-04-24 16:48 ` Amos Kong
2013-04-24 16:46 ` mdroth
2013-04-26 10:12 ` Amos Kong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130416145017.GA1599@vm \
--to=mdroth@linux.vnet.ibm.com \
--cc=akong@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).