From cf12b95bf5a2f30b37c4b91011fb6a9ab70c920d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 3 Aug 2009 17:35:17 +0200 Subject: qdev/prop: macros for creating typechecked properties. There are DEFINE_PROP_$TYPE("name", struct, field, default) macros for each property type. These macros link the qdev_prop_$name struct to the type used by that property. typeof(struct->field) is verifyed to be the correct one for the given property. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori Message-Id: --- hw/qdev-addr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw/qdev-addr.h') diff --git a/hw/qdev-addr.h b/hw/qdev-addr.h index f02bd7a..a0ddf38 100644 --- a/hw/qdev-addr.h +++ b/hw/qdev-addr.h @@ -1,2 +1,5 @@ +#define DEFINE_PROP_TADDR(_n, _s, _f, _d) \ + DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_taddr, target_phys_addr_t) + extern PropertyInfo qdev_prop_taddr; void qdev_prop_set_taddr(DeviceState *dev, const char *name, target_phys_addr_t value); -- cgit v1.1