aboutsummaryrefslogtreecommitdiff
path: root/block/qapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/qapi.c')
-rw-r--r--block/qapi.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/block/qapi.c b/block/qapi.c
index a40922ea26..2050df29e4 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -595,9 +595,11 @@ static void dump_qobject(fprintf_function func_fprintf, void *f,
int comp_indent, QObject *obj)
{
switch (qobject_type(obj)) {
- case QTYPE_QINT: {
- QInt *value = qobject_to_qint(obj);
- func_fprintf(f, "%" PRId64, qint_get_int(value));
+ case QTYPE_QNUM: {
+ QNum *value = qobject_to_qnum(obj);
+ char *tmp = qnum_to_string(value);
+ func_fprintf(f, "%s", tmp);
+ g_free(tmp);
break;
}
case QTYPE_QSTRING: {
@@ -615,11 +617,6 @@ static void dump_qobject(fprintf_function func_fprintf, void *f,
dump_qlist(func_fprintf, f, comp_indent, value);
break;
}
- case QTYPE_QFLOAT: {
- QFloat *value = qobject_to_qfloat(obj);
- func_fprintf(f, "%g", qfloat_get_double(value));
- break;
- }
case QTYPE_QBOOL: {
QBool *value = qobject_to_qbool(obj);
func_fprintf(f, "%s", qbool_get_bool(value) ? "true" : "false");