unicorn/qemu/qapi
Eric Blake 8f8064dc80
qapi: Avoid use of misnamed DO_UPCAST()
The macro DO_UPCAST() is incorrectly named: it converts from a
parent class to a derived class (which is a downcast). Better,
and more consistent with some of the other qapi visitors, is
to use the container_of() macro through a to_FOO() helper. Names
like 'to_ov()' may be a bit short, but for a static helper it
doesn't hurt too much, and matches existing practice in files
like qmp-input-visitor.c.

Our current definition of container_of() is weaker than
DO_UPCAST(), in that it does not require the derived class to
have Visitor as its first member, but this does not hurt our
usage patterns in qapi visitors.

Backports commit d7bea75d35a44023efc9d481d3a1a2600677b2ef from qemu
2018-02-19 11:47:34 -05:00
..
common.json
Makefile.objs
qapi-dealloc-visitor.c qapi: Clean up includes 2018-02-19 01:29:30 -05:00
qapi-visit-core.c qapi: Clean up includes 2018-02-19 01:29:30 -05:00
qmp-input-visitor.c qapi: Clean up includes 2018-02-19 01:29:30 -05:00
qmp-output-visitor.c qapi: Clean up includes 2018-02-19 01:29:30 -05:00
string-input-visitor.c qapi: Avoid use of misnamed DO_UPCAST() 2018-02-19 11:47:34 -05:00