unicorn/qemu/scripts
Eric Blake 65d58b543e
qapi: Fix alternates that accept 'number' but not 'int'
The QMP input visitor allows integral values to be assigned by
promotion to a QTYPE_QFLOAT. However, when parsing an alternate,
we did not take this into account, such that an alternate that
accepts 'number' and some other type, but not 'int', would reject
integral values.

With this patch, we now have the following desirable table:

alternate has case selected for
'int' 'number' QTYPE_QINT QTYPE_QFLOAT
no no error error
no yes 'number' 'number'
yes no 'int' error
yes yes 'int' 'number'

While it is unlikely that we will ever use 'number' in an
alternate other than in the testsuite, it never hurts to be
more precise in what we allow.

Backports commit d00341af384665d259af475b14c96bb8414df415 from qemu
2018-02-19 21:58:10 -05:00
..
create_config more cleanup qemu/configure 2017-01-19 14:11:54 +08:00
make_device_config.sh fix file perms 2015-08-28 21:05:38 -07:00
ordereddict.py import 2015-08-21 15:04:50 +08:00
qapi-event.py qapi: Share gen_visit_fields() 2018-02-19 18:41:41 -05:00
qapi-types.py qapi-types: Drop unnedeed ._fwdefn 2018-02-19 21:53:45 -05:00
qapi-visit.py qapi: Fix alternates that accept 'number' but not 'int' 2018-02-19 21:58:10 -05:00
qapi.py qapi: Inline _make_implicit_tag() 2018-02-19 21:54:43 -05:00