Markus Armbruster <armbru(a)redhat.com> writes:
Anthony Liguori <aliguori(a)us.ibm.com> writes:
> Which is indistinguishable from a straight string property. This means
> it's impossible to introspect because the type is context-sensitive.
>
> What's more, there is no API outside of QemuOptsVisitor that can
> actually work with "lists" of QemuOpts values.
There is: qemu_opt_foreach()
I'm not sure I believe that you wrote that with a straight face... ;-)
> opt = g_malloc0(sizeof(*opt));
> opt->name = g_strdup(name);
> opt->opts = opts;
No, no, no. This makes ':' special, which means you can't have lists of
anything containing ':'. Your cure is worse than the disease. Let go
of that syntactic high-fructose corn syrup, stick to what we have and
works just fine, thank you.
Yes, there *must* be special syntax. If we're treating something
special, then we should indicate to the user that it's special.
Specifically, a list of integers should look distinctly different than
overriding a previously specified integer.
Regards,
Anthony Liguori
Then add suitable list accessor functions and error checks.