|
From: | Avi Kivity |
Subject: | [Qemu-devel] Re: [PATCH 04/29] Introduce QDict |
Date: | Thu, 20 Aug 2009 18:26:14 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 |
On 08/20/2009 06:08 PM, Luiz Capitulino wrote:
The current code, no, but once we read qdicts from the monitor, you need to be able to handle { a: 1, a: 2 }.qdict_add() will refuse to add an existing key, but I can change it to replace instead. Would this be enough?
Yes, that's the standard behaviour. Rename it qdict_put() though.
This assumption does not hold if the dict came from a user.Then the user has to know what he or she is doing. :)They don't, as a rule.That's why there's an assert() there. :)
You don't want user input triggering asserts (I'm talking user in the sense of something external to the program, not in the sense of code in qemu using this function).
-- error compiling committee.c: too many arguments to function
[Prev in Thread] | Current Thread | [Next in Thread] |