On 04/11/2017 12:06 PM, Markus Armbruster wrote:
> Eric Blake <ebl...@redhat.com> writes:
> 
>> Rather than making lots of callers wrap a scalar in a QInt, QString,
>> or QBool, provide helper macros that do the wrapping automatically.
>>
>> Update the Coccinelle script to make mass conversions easy, although
>> the conversion itself will be done as a separate patches to ease
>> review and backport efforts.
>>
>> Signed-off-by: Eric Blake <ebl...@redhat.com>
>> ---
>>  include/qapi/qmp/qdict.h         |  8 ++++++++
>>  include/qapi/qmp/qlist.h         |  8 ++++++++
>>  scripts/coccinelle/qobject.cocci | 22 ++++++++++++++++++++++
>>  3 files changed, 38 insertions(+)
>>
>> diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
>> index fe9a4c5..9d9f9a3 100644
>> --- a/include/qapi/qmp/qdict.h
>> +++ b/include/qapi/qmp/qdict.h
>> @@ -52,6 +52,14 @@ void qdict_destroy_obj(QObject *obj);
>>  #define qdict_put(qdict, key, obj) \
>>          qdict_put_obj(qdict, key, QOBJECT(obj))
>>
>> +/* Helpers for int, bool, and const char*. */
> 
> "char *." looks awkward.  What about
> 
>    /* Helpers for int, bool, and const char * */
> 
> or
> 
>    /* Helpers for int, bool, string */

That does look nicer.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to