mirror of https://gitee.com/openkylin/qemu.git
173bbb754f
Currently string-output-visitor formats floats as %g, which is nice in that trailing 0's are automatically truncated, but otherwise this causes some issues: - it uses 6 significant figures instead of 6 decimal places, which means something like 155777.5 (which even has an exact floating point representation) will be rounded to 155778 when converted to a string. - output will be presented in scientific notation when the normalized form requires a 10^x multiplier. Not a huge deal, but arguably less readable for command-line arguments. - due to using scientific notation for numbers requiring more than 6 significant figures, instead of hard-defined decimal places, it fails a lot of the test-visitor-serialization unit tests for floats. Instead, let's just use %f, which is what the QJSON and the QMP visitors use. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de> |
||
---|---|---|
.. | ||
Makefile.objs | ||
qapi-dealloc-visitor.c | ||
qapi-dealloc-visitor.h | ||
qapi-types-core.h | ||
qapi-visit-core.c | ||
qapi-visit-core.h | ||
qapi-visit-impl.h | ||
qmp-core.h | ||
qmp-dispatch.c | ||
qmp-input-visitor.c | ||
qmp-input-visitor.h | ||
qmp-output-visitor.c | ||
qmp-output-visitor.h | ||
qmp-registry.c | ||
string-input-visitor.c | ||
string-input-visitor.h | ||
string-output-visitor.c | ||
string-output-visitor.h |