qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [qapi] Cannot use list of strings


From: mdroth
Subject: Re: [Qemu-devel] [qapi] Cannot use list of strings
Date: Tue, 16 Apr 2013 09:50:17 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]