qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] Introduce macro for defining qdev propertie


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 2/2] Introduce macro for defining qdev properties
Date: Fri, 17 Jul 2009 12:26:07 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Blue Swirl wrote:
On Fri, Jul 17, 2009 at 5:41 PM, Anthony Liguori<address@hidden> wrote:
This patch introduces macros for defining qdev properties.  The default macro
is clever enough to infer the type of the structure field and to automatically
generate a name for the property.  Additional macros are provided that allow
infered values to be overridden along with a set of macros to define properties
with default values.

Maybe for sake of non-GCC compatibility we should use less clever but
compatible macros, like

If we attempt non-GCC compatibility, we should take a completely different approach.

QDEV_PROP_NAME_DEFVAL_I32
QDEV_PROP_NAME_DEFVAL_I64
QDEV_PROP_NAME_DEFVAL_PTR
QDEV_PROP_NAME_DEFVAL_CHRDEV
etc?

For example, Sparse does not know about __builtin_choose_expr() and
will probably complain.
Should be possible to teach sparse about it.

--
Regards,

Anthony Liguori





reply via email to

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