qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: paul@codesourcery.com, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [RfC PATCH 0/2] qdev/prop: type checking.
Date: Mon, 13 Jul 2009 15:33:49 +0200	[thread overview]
Message-ID: <1247492031-16104-1-git-send-email-kraxel@redhat.com> (raw)

  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	other threads:[~2009-07-13 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 13:33 Gerd Hoffmann [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1247492031-16104-1-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).