[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 06/13] qobject: Add helper macros for common
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 06/13] qobject: Add helper macros for common scalar insertions |
Date: |
Wed, 12 Apr 2017 08:17:42 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 04/12/2017 01:40 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> 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 <address@hidden>
>>
>> ---
>> v4: tweak comment wording
>> v3: new patch
>> ---
>> 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..f70d435 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 string. */
>
> Nitpick: this isn't a sentence, so why the period?
Hmm, there's no period on the comment just before:
/* Helper to qdict_put_obj(), accepts any object */
I'm fine if you touch it up on commit.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 00/13] qapi-related cleanups, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 01/13] pci: Use struct instead of QDict to pass back parameters, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 02/13] pci: Reduce scope of error injection, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 03/13] s390x: Drop useless casts, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 04/13] coccinelle: Add script to remove useless QObject casts, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 06/13] qobject: Add helper macros for common scalar insertions, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 05/13] qobject: Drop useless QObject casts, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 08/13] tests: Use simpler QDict/QList scalar insertion macros, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 07/13] block: Use simpler QDict/QList scalar insertion macros, Eric Blake, 2017/04/11
- [Qemu-devel] [PATCH v4 11/13] QemuOpts: Simplify qemu_opts_to_qdict(), Eric Blake, 2017/04/11