qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RfC PATCH 0/2] qdev: property macros.
@ 2009-07-28 10:24 Gerd Hoffmann
  2009-07-28 10:24 ` [Qemu-devel] [RfC PATCH 1/2] qdev/pci: make PCIDevice->devfn uint32_t Gerd Hoffmann
  2009-07-28 10:24 ` [Qemu-devel] [RfC PATCH 2/2] qdev/prop: macros for creating typechecked properties Gerd Hoffmann
  0 siblings, 2 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2009-07-28 10:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi folks,

Presenting a new version of my patch to continue the discussion how
the macros should look like ;)

There are DEFINE_PROP_$TYPE("name", struct, field, default) macros for
each property type, thus no gcc-powered automagic selection.

typeof(struct->field) is verifyed to be the correct one for the given
property though (new in this version).  This uses gcc extentions, but
as it is a check only it could easily be turned off for non-gcc
compilers if needed.

Comments?

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [Qemu-devel] [RfC PATCH 0/2] qdev: property macros.
@ 2009-07-28 16:21 Gerd Hoffmann
  2009-07-28 16:21 ` [Qemu-devel] [RfC PATCH 1/2] qdev/pci: make PCIDevice->devfn uint32_t Gerd Hoffmann
  0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2009-07-28 16:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi folks,

Presenting a new version of my patch to continue the discussion how
the macros should look like ;)

There are DEFINE_PROP_$TYPE("name", struct, field, default) macros for
each property type, thus no gcc-powered automagic selection.

typeof(struct->field) is verifyed to be the correct one for the given
property though (new in this version).  This uses gcc extentions, but
as it is a check only it could easily be turned off for non-gcc
compilers if needed.

Comments?

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-28 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28 10:24 [Qemu-devel] [RfC PATCH 0/2] qdev: property macros Gerd Hoffmann
2009-07-28 10:24 ` [Qemu-devel] [RfC PATCH 1/2] qdev/pci: make PCIDevice->devfn uint32_t Gerd Hoffmann
2009-07-28 10:24 ` [Qemu-devel] [RfC PATCH 2/2] qdev/prop: macros for creating typechecked properties Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2009-07-28 16:21 [Qemu-devel] [RfC PATCH 0/2] qdev: property macros Gerd Hoffmann
2009-07-28 16:21 ` [Qemu-devel] [RfC PATCH 1/2] qdev/pci: make PCIDevice->devfn uint32_t Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).