mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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 <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
This commit is contained in:
parent
93c8cfd9e6
commit
cf12b95bf5
2 changed files with 41 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue