qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RfC PATCH 2/2] qdev/prop: convert pci.c to	helper macros.
Date: Fri, 31 Jul 2009 17:01:27 +0200	[thread overview]
Message-ID: <4A730747.9000306@redhat.com> (raw)
In-Reply-To: <20090731143251.GA9233@redhat.com>

On 07/31/09 16:32, Michael S. Tsirkin wrote:
> Unfortunately there's still duplication - in the macro definition:
> DEFINE_PROP_DEFAULT(_n, _s, _f, _d, qdev_prop_uint64, uint64_t)

It has to be somewhere ...

> Full self-contained toy example below, in case you want to play with
> my idea some more:

Can you create a working patch against qemu next time please?

> #include<stdio.h>
> #include<stddef.h>
>
> struct prop {
> 	long long type;
> };

This is the PropertyInfo aequivalent, right?

Note we are using the very same PropertyInfo struct for all property 
types we have, thus your idea simply doesn't work.  We could use a 
different struct for each type.  That wouldn't solve the fundamental 
issue though, it would just shift it to another place.

cheers,
   Gerd

  reply	other threads:[~2009-07-31 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 13:04 [Qemu-devel] [RfC PATCH 0/2] qdev/prop: macros for creating typechecked properties Gerd Hoffmann
2009-07-31 13:04 ` [Qemu-devel] [RfC PATCH 1/2] " Gerd Hoffmann
2009-07-31 13:04 ` [Qemu-devel] [RfC PATCH 2/2] qdev/prop: convert pci.c to helper macros Gerd Hoffmann
2009-07-31 14:32   ` Michael S. Tsirkin
2009-07-31 15:01     ` Gerd Hoffmann [this message]
2009-07-31 15:42     ` 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=4A730747.9000306@redhat.com \
    --to=kraxel@redhat.com \
    --cc=mst@redhat.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).