From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW7Ef-0003nn-51 for qemu-devel@nongnu.org; Thu, 01 Dec 2011 09:03:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RW7EZ-0007OZ-8A for qemu-devel@nongnu.org; Thu, 01 Dec 2011 09:03:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW7EZ-0007Ni-0P for qemu-devel@nongnu.org; Thu, 01 Dec 2011 09:03:31 -0500 Message-ID: <4ED7892A.1050502@redhat.com> Date: Thu, 01 Dec 2011 16:03:22 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1322687028-29714-1-git-send-email-aliguori@us.ibm.com> <1322687028-29714-8-git-send-email-aliguori@us.ibm.com> <4ED76325.6080305@redhat.com> <4ED784B3.8060800@codemonkey.ws> In-Reply-To: <4ED784B3.8060800@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/18] qom: add link properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Peter Maydell , Anthony Liguori , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino On 12/01/2011 03:44 PM, Anthony Liguori wrote: >> So, links are equivalent to pointers? > > > Yup. Once we have qom inheritance (next stage), we can have a > link property and you'll be able to set it to an E1000State > with the appropriate casting and error checking taking place. I really like this goal but can't help feeling that we're stretching C beyond its limits here, so that the client code ends up boilerplate-heavy. Kind of like the issue with local_err elsewhere in this thread, where you juggle things instead of a "throw Exception(...)". What does the client code looks like for link? -- error compiling committee.c: too many arguments to function