qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RfC PATCH 0/2] qdev/prop: type checking.


From: Gerd Hoffmann
Subject: [Qemu-devel] [RfC PATCH 0/2] qdev/prop: type checking.
Date: Mon, 13 Jul 2009 15:33:49 +0200

  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





reply via email to

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