[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [RFC PATCH 08/12] qjson: allow caller to a
From: |
John Snow |
Subject: |
Re: [Qemu-block] [Qemu-devel] [RFC PATCH 08/12] qjson: allow caller to ask for arbitrary indent |
Date: |
Wed, 16 May 2018 17:49:44 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 05/16/2018 05:34 PM, Eric Blake wrote:
> On 05/11/2018 08:25 PM, John Snow wrote:
>> The function already exists, just expose it.
>>
>> Signed-off-by: John Snow <address@hidden>
>> ---
>> include/qapi/qmp/qjson.h | 1 +
>> qobject/qjson.c | 21 +++++++++++----------
>> 2 files changed, 12 insertions(+), 10 deletions(-)
>>
>> diff --git a/include/qapi/qmp/qjson.h b/include/qapi/qmp/qjson.h
>> index b274ac3a86..0e8624c1fa 100644
>> --- a/include/qapi/qmp/qjson.h
>> +++ b/include/qapi/qmp/qjson.h
>> @@ -19,6 +19,7 @@ QObject *qobject_from_jsonf(const char *string, ...)
>> GCC_FMT_ATTR(1, 2);
>> QObject *qobject_from_jsonv(const char *string, va_list *ap, Error
>> **errp)
>> GCC_FMT_ATTR(1, 0);
>> +QString *qobject_to_json_opt(const QObject *obj, int pretty, int
>> indent);
>
> pretty seems like it is better as a bool. Even though to_json() isn't
> typed correctly, that's no excuse for the public function to copy a bad
> interface (and maybe it's worth a separate cleanup patch to fix
> to_json() first).
>
Eh, sure, why not. Done.
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 06/12] qapi: add bitmap info, (continued)
- [Qemu-block] [RFC PATCH 04/12] qcow2/dirty-bitmaps: load IN_USE bitmaps if disk is RO, John Snow, 2018/05/11
- [Qemu-block] [RFC PATCH 03/12] block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmaps, John Snow, 2018/05/11
- [Qemu-block] [RFC PATCH 05/12] qcow2-bitmap: track bitmap type, John Snow, 2018/05/11
- [Qemu-block] [RFC PATCH 08/12] qjson: allow caller to ask for arbitrary indent, John Snow, 2018/05/11
- [Qemu-block] [RFC PATCH 07/12] qcow2-bitmap: add basic bitmaps info, John Snow, 2018/05/11
- [Qemu-block] [RFC PATCH 09/12] qapi/block-core: add BitmapMapping and BitmapEntry structs, John Snow, 2018/05/11
- [Qemu-block] [RFC PATCH 10/12] qemu-img: split off common chunk of map command, John Snow, 2018/05/11
- [Qemu-block] [RFC PATCH 11/12] qemu-img: add bitmap dump, John Snow, 2018/05/11