From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MW6dD-0000F1-CU for qemu-devel@nongnu.org; Wed, 29 Jul 2009 06:43:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MW6d7-0000DY-GC for qemu-devel@nongnu.org; Wed, 29 Jul 2009 06:43:33 -0400 Received: from [199.232.76.173] (port=37011 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MW6d7-0000DT-4l for qemu-devel@nongnu.org; Wed, 29 Jul 2009 06:43:29 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:36706) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MW6d6-0002mV-Cw for qemu-devel@nongnu.org; Wed, 29 Jul 2009 06:43:28 -0400 Received: from smtp2-g21.free.fr (localhost [127.0.0.1]) by smtp2-g21.free.fr (Postfix) with ESMTP id AB8C44B012E for ; Wed, 29 Jul 2009 12:43:24 +0200 (CEST) Received: from laptop (vaf26-2-82-244-111-82.fbx.proxad.net [82.244.111.82]) by smtp2-g21.free.fr (Postfix) with ESMTP id 3F3694B0191 for ; Wed, 29 Jul 2009 12:43:21 +0200 (CEST) In-Reply-To: <4A701B1F.9040900@redhat.com> Subject: Re: [Qemu-devel] Re: [PATCH 01/25] Introduce QEMU dictionary data type From: "=?utf-8?q?Fran=C3=A7ois?= Revol" Date: Wed, 29 Jul 2009 12:42:53 +0200 CEST Message-Id: <234865299-BeMail@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > > 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 > > destroy() > > type() - return the type > > as=5Fdict(), as=5Fstring(), as=5Fint() - convert to a subclass so its > > methods can be used > > > > Consider an operation such as printing out the dictionary, you have > > to > > know the types of the values. > > > > Note, if we decide we want this it could be introduced later to avoid > excessive churn on this patchset. Might as well just use C++ then :^) Fran=C3=A7ois.