[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v4 2/5] qapi: Add qobject_is_equal(
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v4 2/5] qapi: Add qobject_is_equal() |
Date: |
Tue, 11 Jul 2017 15:17:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 2017-07-11 13:33, Markus Armbruster wrote:
> Max Reitz <address@hidden> writes:
>
>> First of all, OK, you don't want QNum(42.0) to equal QNum(42) at all (at
>> least not right now and in the foreseeable future).
>> You're the maintainer, so you decide, so I'll go along with it. :-)
>>
>> Now, let's follow up with my therefore rather useless commentary:
>>
>> (Feel free to disregard, because honestly, I can see how replying to
>> most of the points I'm asking isn't really worth the time...)
>
> When I use the authority entrusted to maintainers, I feel obliged to at
> least explain my reasoning. Besides, putting my reasoning in words
> tends to lead me to new insights.
And I am indeed very grateful for that. :-)
>> On 2017-07-10 11:17, Markus Armbruster wrote:
>>> Max Reitz <address@hidden> writes:
>>>
>>>> On 2017-07-06 16:30, Markus Armbruster wrote:
[...]
>>> The only way to add unsigned integers without breaking QMP compatibility
>>> is to make them interchangeable with signed integers. That doesn't mean
>>> you get to make floating-point numbers interchangeable with integers
>>> now.
>>
>> Again, begs the question why QNum covers floating point numbers then and
>> why this very fact is not documented in qnum.c.
>
> What kind of documentation would you like to see?
It would be good to note that the QNum type is not meant to be a
completely uniform way to handle JSON numbers (e.g. if the user provides
something with a decimal point but you need an integer, QNum will not do
that conversion for you).
It is (English indirect speech is broken badly) just meant to
encapsulate the different variants a number can be represented in, but
you're still generally supposed to read it out the way it was put in
(exceptions apply, see signed/unsigned and qnum_get_double()).
Max
signature.asc
Description: OpenPGP digital signature
[Qemu-block] [PATCH v4 3/5] block: qobject_is_equal() in bdrv_reopen_prepare(), Max Reitz, 2017/07/05
[Qemu-block] [PATCH v4 4/5] iotests: Add test for non-string option reopening, Max Reitz, 2017/07/05
[Qemu-block] [PATCH v4 5/5] tests: Add check-qobject for equality tests, Max Reitz, 2017/07/05