qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/11] Add operations to qlist to allow it to be


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 02/11] Add operations to qlist to allow it to be used as a stack
Date: Thu, 12 Nov 2009 17:56:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Thunderbird/3.0b4

Am 12.11.2009 17:46, schrieb Anthony Liguori:
> Kevin Wolf wrote:
>> Am 11.11.2009 18:28, schrieb Anthony Liguori:
>>   
>>> This makes lists no longer invariant. It's a very useful bit of 
>>> functionality
>>> though.
>>>
>>> To deal with the fact that lists are no longer invariant, introduce a deep
>>> copy mechanism for lists.
>>>
>>> Signed-off-by: Anthony Liguori <address@hidden>
>>> ---
>>>  qlist.c |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  qlist.h |    4 ++++
>>>  2 files changed, 60 insertions(+), 0 deletions(-)
>>>     
>>
>> So far all functions in qlist.c have a header comment. Any reason to
>> change this?
>>   
> 
> But nothing else in qemu does.

Unfortunately. There are places where such comments could be a good
specification on what an interface is actually meant to work like
(particularly in error cases). Currently you often can't tell if the
implementation or the caller of a function is buggy.

Not sure if they are really useful for the simple qlist.c functions (but
even there the function name does not tell me what it's doing with NULL
parameters), but it might be helpful to have a general discussion about
it. I think in general qemu is poorly commented.

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]