Re: [Qemu-devel] [PATCH v5 1/5] qobject: ensure base is at offset 0

2018-04-18 Thread Markus Armbruster
Eric Blake writes: > On 04/18/2018 11:45 AM, Markus Armbruster wrote: > >>> Might also be worth mentioning that this explicitly guarantees that >>> existing casts work correctly (even though we'd prefer to get rid of >>> such casts in any location except the qobject.h macros); Markus pointed out:

Re: [Qemu-devel] [PATCH v5 1/5] qobject: ensure base is at offset 0

2018-04-18 Thread Eric Blake
On 04/18/2018 11:45 AM, Markus Armbruster wrote: >> Might also be worth mentioning that this explicitly guarantees that >> existing casts work correctly (even though we'd prefer to get rid of >> such casts in any location except the qobject.h macros); Markus pointed out: >> Uh, there's anothe

Re: [Qemu-devel] [PATCH v5 1/5] qobject: ensure base is at offset 0

2018-04-18 Thread Marc-André Lureau
Hi On Wed, Apr 18, 2018 at 6:45 PM, Markus Armbruster wrote: > Eric Blake writes: > >> On 04/17/2018 08:35 AM, Marc-André Lureau wrote: >>> All QObject types have the base QObject as first field. This allows to >> >> s/as/as their/ >> >>> simplify qobject_to() and will allow further simplificati

Re: [Qemu-devel] [PATCH v5 1/5] qobject: ensure base is at offset 0

2018-04-18 Thread Markus Armbruster
Eric Blake writes: > On 04/17/2018 08:35 AM, Marc-André Lureau wrote: >> All QObject types have the base QObject as first field. This allows to > > s/as/as their/ > >> simplify qobject_to() and will allow further simplification in > > s/allows to simplify/allows the simplification of/ > s/in/in t

Re: [Qemu-devel] [PATCH v5 1/5] qobject: ensure base is at offset 0

2018-04-17 Thread Eric Blake
On 04/17/2018 08:35 AM, Marc-André Lureau wrote: > All QObject types have the base QObject as first field. This allows to s/as/as their/ > simplify qobject_to() and will allow further simplification in s/allows to simplify/allows the simplification of/ s/in/in the/ > following patch. Might als

[Qemu-devel] [PATCH v5 1/5] qobject: ensure base is at offset 0

2018-04-17 Thread Marc-André Lureau
All QObject types have the base QObject as first field. This allows to simplify qobject_to() and will allow further simplification in following patch. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qobject.h | 5 ++--- qobject/qobject.c | 9 + 2 files changed, 11 insertio