qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 2/7] virtio-bus: introduce virtio-bus


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V3 2/7] virtio-bus: introduce virtio-bus
Date: Mon, 21 Jan 2013 10:56:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 01/21/2013 08:48 AM, Peter Maydell wrote:
> On 14 January 2013 23:08,  <address@hidden> wrote:
>> +#define TYPE_VIRTIO_BUS "virtio-bus"
>> +#define VIRTIO_BUS_GET_CLASS(obj) \
>> +        OBJECT_GET_CLASS(VirtioBusClass, obj, TYPE_VIRTIO_BUS)
>> +#define VIRTIO_BUS_CLASS(klass) \
>> +        OBJECT_CLASS_CHECK(VirtioBusClass, klass, TYPE_VIRTIO_BUS)
> 
> 'obj' and 'klass' need brackets round them, because they're
> macro arguments.

Brackets are only necessary if the C parser could misinterpret things
without the brackets; but in this particular case, there is no ambiguity
(unless OBJECT_GET_CLASS() and OBJECT_CLASS_CHECK() are improperly
under-parenthesized).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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