qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RfC PATCH 0/2] qdev/prop: type checking.
@ 2009-07-13 13:33 Gerd Hoffmann
  2009-07-13 13:33 ` [Qemu-devel] [PATCH 1/2] qdev/prop: add property type Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2009-07-13 13:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: paul, Gerd Hoffmann

  Hi,

Two patches to improve qdev attribute type checking.  Goes on top of the
qdev bits in anthonys patch queue and the other qdev/prop patches posted
today.

The first adds a type field to PropertyInfo and switches the
qdev_prop_set_*() functions from size checkinf to type checking.  The
functions are also changed to not return an error and abort() instead.

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.

comments & ideas are welcome,

  Gerd

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 13:33 [Qemu-devel] [RfC PATCH 0/2] qdev/prop: type checking Gerd Hoffmann
2009-07-13 13:33 ` [Qemu-devel] [PATCH 1/2] qdev/prop: add property type Gerd Hoffmann
2009-07-13 13:33 ` [Qemu-devel] [PATCH 2/2] qdev/prop: helper macros Gerd Hoffmann
2009-07-13 15:36 ` [Qemu-devel] [RfC PATCH 0/2] qdev/prop: type checking Paul Brook
2009-07-13 19:19   ` 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).