unicorn/qemu/include/qapi
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
..
qmp qapi: Convert QType into QAPI built-in enum type 2018-02-19 21:47:05 -05:00
dealloc-visitor.h
error.h qapi: Change munging of CamelCase enum values 2018-02-19 20:40:15 -05:00
qmp-input-visitor.h
qmp-output-visitor.h
string-input-visitor.h
visitor-impl.h qapi: Fix alternates that accept 'number' but not 'int' 2018-02-19 21:58:10 -05:00
visitor.h qapi: Fix alternates that accept 'number' but not 'int' 2018-02-19 21:58:10 -05:00