From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQNaK-0005js-C3 for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:36:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQNaF-0005i4-MD for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:36:55 -0400 Received: from [199.232.76.173] (port=56993 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQNaF-0005hz-9s for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:36:51 -0400 Received: from mx20.gnu.org ([199.232.41.8]:62955) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQNaE-0002KZ-UD for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:36:51 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQNaC-0004wS-QO for qemu-devel@nongnu.org; Mon, 13 Jul 2009 11:36:49 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [RfC PATCH 0/2] qdev/prop: type checking. Date: Mon, 13 Jul 2009 16:36:44 +0100 References: <1247492031-16104-1-git-send-email-kraxel@redhat.com> In-Reply-To: <1247492031-16104-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131636.45711.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann > The second helps a bunch of helper macros to help creating property > declarations and converts pci.c as example. I'm not that happy with > that one yet. Especially I'd like to check somehow that > typeof(_state->_field) == _type. But couldn't figure out a way to do > so. As we are setting up static data structures we are quite limited in > what we can do here. The typechecking trick used by the linux kernel > min/max macros can't be used for example. Could we use a union rather than an opaque pointer for the default value? Paul