qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RfC PATCH 2/2] qdev/prop: convert pci.c to helper macr


From: Gerd Hoffmann
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
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

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 via email to

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