[Top][All Lists]

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

Re: [Qemu-devel] Re: [PATCH 01/25] Introduce QEMU dictionary data type

From: Avi Kivity
Subject: Re: [Qemu-devel] Re: [PATCH 01/25] Introduce QEMU dictionary data type
Date: Wed, 29 Jul 2009 17:05:10 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

On 07/29/2009 04:28 PM, Anthony Liguori wrote:
I'm worried about all those void *s as they move responsibility for type safety and lifecycle management to the user. I'd much rather see a QObject (or Object) with the following methods:

clone() - deep copy an object; dicts will store copies so we'll avoid those leaks or a dictionary member modified after it was stored

It probably would be just as easy to do a ref()/unref() such that the deep copying was avoided.

Shallow copies have their own pitfalls, you put something in a dict and then modify it later. I keep getting bitten by this in Python. I guess we could live with it though. The important thing is to have proper lifecycle management, which refcounting solves as well.

error compiling committee.c: too many arguments to function

reply via email to

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