Re: [Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to()

2018-03-19 Thread Max Reitz
On 2018-03-19 20:36, Eric Blake wrote: > On 02/26/2018 05:58 AM, Max Reitz wrote: >> On 2018-02-24 21:57, Eric Blake wrote: >>> On 02/24/2018 09:40 AM, Max Reitz wrote: This is a dynamic casting macro that, given a QObject type, returns an object as that type or NULL if the object is of a

Re: [Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to()

2018-03-19 Thread Eric Blake
On 02/26/2018 05:58 AM, Max Reitz wrote: On 2018-02-24 21:57, Eric Blake wrote: On 02/24/2018 09:40 AM, Max Reitz wrote: This is a dynamic casting macro that, given a QObject type, returns an object as that type or NULL if the object is of a different type (or NULL itself). +#define qobject

Re: [Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to()

2018-02-27 Thread Alberto Garcia
On Sat 24 Feb 2018 04:40:28 PM CET, Max Reitz wrote: > This is a dynamic casting macro that, given a QObject type, returns an > object as that type or NULL if the object is of a different type (or > NULL itself). > > The macro uses lower-case letters because: > 1. There does not seem to be a hard r

Re: [Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to()

2018-02-26 Thread Max Reitz
On 2018-02-24 21:57, Eric Blake wrote: > On 02/24/2018 09:40 AM, Max Reitz wrote: >> This is a dynamic casting macro that, given a QObject type, returns an >> object as that type or NULL if the object is of a different type (or >> NULL itself). >> >> The macro uses lower-case letters because: >> 1.

Re: [Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to()

2018-02-24 Thread Eric Blake
On 02/24/2018 09:40 AM, Max Reitz wrote: This is a dynamic casting macro that, given a QObject type, returns an object as that type or NULL if the object is of a different type (or NULL itself). The macro uses lower-case letters because: 1. There does not seem to be a hard rule on whether qemu m

[Qemu-devel] [PATCH v3 2/7] qapi: Add qobject_to()

2018-02-24 Thread Max Reitz
This is a dynamic casting macro that, given a QObject type, returns an object as that type or NULL if the object is of a different type (or NULL itself). The macro uses lower-case letters because: 1. There does not seem to be a hard rule on whether qemu macros have to be upper-cased, 2. The cur