]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qobject/qnum.c
qobject: Factor JSON writer out of qobject_to_json()
[mirror_qemu.git] / qobject / qnum.c
index 35ba41e61c847b8302256c12328117f1753ed21d..5dd66938dd84dcb77c184bf2dd69e1473d3ec5d7 100644 (file)
@@ -168,11 +168,6 @@ char *qnum_to_string(QNum *qn)
     case QNUM_U64:
         return g_strdup_printf("%" PRIu64, qn->u.u64);
     case QNUM_DOUBLE:
-        /* FIXME: g_strdup_printf() is locale dependent; but JSON requires
-         * numbers to be formatted as if in the C locale. Dependence
-         * on C locale is a pervasive issue in QEMU. */
-        /* FIXME: This risks printing Inf or NaN, which are not valid
-         * JSON values. */
         /* 17 digits suffice for IEEE double */
         return g_strdup_printf("%.17g", qn->u.dbl);
     }