unicorn/qemu/qom
Markus Armbruster 3e8b0c66a3
qom: Make object_property_set_qobject()'s input visitor strict
Commit 240f64b made all qobject input visitors created outside tests
strict, except for the one in object_property_set_qobject(). That one
was left behind only because Eric couldn't spare the time to figure
out whether making it strict would break anything, with a TODO
comment. Time to resolve it.

Strict makes a difference only for otherwise successful visits of QAPI
structs or unions. Let's examine what the callers of
object_property_set_qobject() visit:

* object_property_set_str(), object_property_set_bool(),
object_property_set_int() visit a QString, QBool, QInt,
respectively. Strictness can't matter.

* qmp_qom_set visits its @value argument. Comes straight from QMP and
can be anything ('any' in the QAPI schema). Strictness matters when
the property's set() method visits a struct or union QAPI type.

No such methods exist, thus switching to strict can't break
anything.

If we acquire such methods in the future, we'll *want* the visitor
to be strict, so that unexpected members get rejected as they should
be.

Switch to strict.

Backports commit 05601ed2de60df0e344d6b783a6bc0c1ff2b5d1f from qemu
2018-03-02 12:10:50 -05:00
..
container.c qom: Allow properties to be registered against classes 2018-02-21 21:00:56 -05:00
cpu.c arm: Correctly handle watchpoints for BE32 CPUs 2018-03-02 00:24:33 -05:00
Makefile.objs import 2015-08-21 15:04:50 +08:00
object.c qom/object: update class cache atomically 2018-02-26 05:06:40 -05:00
qom-qobject.c qom: Make object_property_set_qobject()'s input visitor strict 2018-03-02 12:10:50 -05:00