History | View | Annotate | Download (3.6 kB)
qapi: Refine human printing of sizes
This fixes several bugs or shortcomings of the previous pretty-printer.In particular:
qapi: Add human mode to StringOutputVisitor
This will be used by "info qtree". For numbers it prints both thedecimal and hex values. For sizes it rounds to the nearest powerof 2^10. For strings, it puts quotes around the string and separatesNULL and empty string....
qapi: move include files to include/qobject/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qapi: String visitor, use %f representation for floats
Currently string-output-visitor formats floats as %g, which is nice inthat trailing 0's are automatically truncated, but otherwise this causessome issues:
- it uses 6 significant figures instead of 6 decimal places, which...
qapi: add string-based visitors
String based visitors provide a consistent interface for parsingstrings to C values, as well as consuming C values as strings.They will be used to parse command-line options.