From 01b2ffcedd94ad7b42bc870e4c6936c87ad03429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 7 Jun 2017 20:35:58 +0400 Subject: qapi: merge QInt and QFloat in QNum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We would like to use a same QObject type to represent numbers, whether they are int, uint, or floats. Getters will allow some compatibility between the various types if the number fits other representations. Add a few more tests while at it. Signed-off-by: Marc-André Lureau Message-Id: <20170607163635.17635-7-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster [parse_stats_intervals() simplified a bit, comment in test_visitor_in_int_overflow() tidied up, suppress bogus warnings] Signed-off-by: Markus Armbruster --- scripts/qapi-visit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/qapi-visit.py') diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index 5737aef..cc447ec 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -164,7 +164,7 @@ def gen_visit_alternate(name, variants): promote_int = 'true' ret = '' for var in variants.variants: - if var.type.alternate_qtype() == 'QTYPE_QINT': + if var.type.alternate_qtype() == 'QTYPE_QNUM': promote_int = 'false' ret += mcgen(''' -- cgit v1.1