[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/54] qdict: add qdict_put_null() helper
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/54] qdict: add qdict_put_null() helper |
Date: |
Fri, 25 Aug 2017 10:46:45 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/22/2017 10:09 AM, Markus Armbruster wrote:
> #define qdict_put_bool(qdict, key, value) \
>> qdict_put(qdict, key, qbool_from_bool(value))
>> #define qdict_put_str(qdict, key, value) \
>> qdict_put(qdict, key, qstring_from_str(value))
>> +#define qdict_put_null(qdict, key) \
>> + qdict_put(qdict, key, qnull())
>>
>> /* High level helpers */
>> double qdict_get_double(const QDict *qdict, const char *key);
>
> Marginal. I can accept it for completeness's sake, or rather a step
> towards completeness. But please update the "Helpers for ..." comment,
> and convert existing qdict_put(QD, K, qnull()) to use qdict_put_null().
> A quick grep finds some in target/i386/cpu.c. There might be more.
And we already used Coccinelle to find candidates for qdict_put_bool and
friends, so that should be the reasonable approach to use here as well.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 10/54] block: use qemu_enum_parse() in blkdebug_debug_breakpoint, (continued)
- [Qemu-devel] [PATCH v2 02/54] qdict: add qdict_put_null() helper, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 37/54] qapi: 'if' to alternate variant, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 32/54] qapi: add 'if' to struct members, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 08/54] hmp: use qapi_enum_parse() in hmp_migrate_set_capability, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 21/54] qapi-introspect: modify to_qlit() to generate #if code, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 29/54] qapi: add 'if' to enum members, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 43/54] qapi2texi: add 'If:' condition to struct members, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 30/54] qapi: add #if conditions on generated enum values, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 04/54] qlit: add qobject_form_qlit(), Marc-André Lureau, 2017/08/22