unicorn/qemu/include/qapi
Marc-André Lureau f4b3c5d0bd
qobject: use a QObjectBase_ struct
By moving the base fields to a QObjectBase_, QObject can be a type
which also has a 'base' field. This allows writing a generic QOBJECT()
macro that will work with any QObject type, including QObject
itself. The container_of() macro ensures that the object to cast has a
QObjectBase_ base field, giving some type safety guarantees. QObject
must have no members but QObjectBase_ base, or else QOBJECT() breaks.

QObjectBase_ is not a typedef and uses a trailing underscore to make
it obvious it is not for normal use and to avoid potential abuse.

Backports commit 3d3eacaeccaab718ea0e2ddaa578bfae9e311c59 from qemu
2018-05-04 10:11:24 -04:00
..
qmp qobject: use a QObjectBase_ struct 2018-05-04 10:11:24 -04:00
clone-visitor.h qapi: New QAPI_CLONE_MEMBERS() 2018-03-03 17:36:02 -05:00
dealloc-visitor.h qapi: Add new visit_free() function 2018-02-25 01:05:41 -05:00
error.h qapi: Move qapi-schema.json to qapi/, rename generated files 2018-03-09 11:35:11 -05:00
qobject-input-visitor.h qapi: merge QInt and QFloat in QNum 2018-03-03 18:16:28 -05:00
qobject-output-visitor.h qapi: merge QInt and QFloat in QNum 2018-03-03 18:16:28 -05:00
string-input-visitor.h string-input-visitor: Favor new visit_free() function 2018-02-25 01:08:04 -05:00
visitor-impl.h qapi: Use QNull for a more regular visit_type_null() 2018-03-07 16:50:16 -05:00
visitor.h qapi: Move qapi-schema.json to qapi/, rename generated files 2018-03-09 11:35:11 -05:00