qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 05/22] qobject: Simplify qobject_from_jsonv()


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v4 05/22] qobject: Simplify qobject_from_jsonv()
Date: Mon, 02 Oct 2017 09:15:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 08/03/2017 08:25 PM, Eric Blake wrote:
>> qobject_from_jsonv() was unusual in that it took a va_list*, instead
>> of the more typical va_list; this was so that callers could pass
>> NULL to avoid % interpolation.  While this works under the hood, it
>> is awkward for callers, so move the magic into qjson.c rather than
>> in the public interface, and finally improve the documentation of
>> qobject_from_jsonf().
>> 
>
>> +/*
>> + * va_list form of qobject_from_jsonf().
>> + *
>> + * IMPORTANT: This function aborts on error, thus it must not
>> + * be used with untrusted arguments.
>> + */
>> +QObject *qobject_from_jsonv(const char *string, va_list ap)
>> +{
>
> Given your comments on vararg naming elsewhere in the series, I'm also
> thinking this is a good chance to fix this to be named
> qobject_from_vjsonf() (making it obvious it is the va_list form of
> formatted json, and similar to printf/vprintf or my
> qtest_startf/qtest_vstartf in my v7 preliminary cleanup series).

Yes, please.



reply via email to

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