qobject: Ensure base is at offset 0
commit7ee9edfdb117da47c86c9764d90f0be11a648666
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 19 Apr 2018 15:01:41 +0000 (19 17:01 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 4 May 2018 06:27:53 +0000 (4 08:27 +0200)
tree76e597b01b87fa5c6707e6f6410cb347fefbb0b3
parent46cfbf13b06d551072ed17fbfca67c103edf814f
qobject: Ensure base is at offset 0

All QObject types have the base QObject as their first field. This
allows the simplification of qobject_to().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180419150145.24795-2-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message paragraph on type casts dropped, to avoid giving the
impression type casting would be okay]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
include/qapi/qmp/qobject.h
qobject/qobject.c