From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fexZP-000247-SJ for qemu-devel@nongnu.org; Mon, 16 Jul 2018 03:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fexZP-0003fH-6f for qemu-devel@nongnu.org; Mon, 16 Jul 2018 03:05:19 -0400 References: <1531470464-21522-1-git-send-email-thuth@redhat.com> <1531470464-21522-2-git-send-email-thuth@redhat.com> <20180713211636.GS31657@localhost.localdomain> <0a63f154-ac68-b6f0-ab6a-e0951c6ae8d5@suse.de> <20180713214654.GW31657@localhost.localdomain> From: Thomas Huth Message-ID: Date: Mon, 16 Jul 2018 09:05:07 +0200 MIME-Version: 1.0 In-Reply-To: <20180713214654.GW31657@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 01/16] qom/object: Add a new function object_initialize_child() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , =?UTF-8?Q?Andreas_F=c3=a4rber?= Cc: qemu-devel@nongnu.org, Peter Maydell , Paolo Bonzini , qemu-arm@nongnu.org, Markus Armbruster , Beniamino Galvani , Subbaraya Sundeep , Alistair Francis , "Edgar E. Iglesias" On 13.07.2018 23:46, Eduardo Habkost wrote: > On Fri, Jul 13, 2018 at 11:29:17PM +0200, Andreas F=C3=A4rber wrote: >> Am 13.07.2018 um 23:16 schrieb Eduardo Habkost: >>> I wonder if we should deprecate object_initialize() and support >>> only object_initialize_child() later. Initializing an object >>> contained inside another one without making it a child of the >>> parent object is a recipe for trouble. >> >> The root container object needs to be initialized, too. >=20 > If the object is not embedded in another struct, I would expect > it to be created using object_new() instead of > object_initialize(). True. So I guess having a closer look at code that calls object_initialize() only is something for our TODO lists once 3.0 has been released... Thomas