History | View | Annotate | Download (8.8 kB)
qapi: make visit_type_size fallback to type_int
Currently visit_type_size checks if the visitor's type_size function pointer isNULL. If not, it calls it, otherwise it calls v->type_uint64(). But neither ofthese pointers are ever set. Fallback to calling v->type_int() in this third...
qapi: Anonymous unions
The discriminator for anonymous unions is the data type. This allows tohave a union type that allows both of these:
{ 'file': 'my_existing_block_device_id' } { 'file': { 'filename': '/tmp/mydisk.qcow2', 'read-only': true } }...
qapi: Add visitor for implicit structs
These can be used when an embedded struct is parsed and members notbelonging to the struct may be present in the input (e.g. parsing aflat namespace QMP union, where fields from both the base and oneof the alternative types are mixed in the JSON object)...
qapi: move include files to include/qobject/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qapi: move inclusions of qemu-common.h from headers to .c files
qapi: remove qapi/qapi-types-core.h
The file is only including error.h and qerror.h. Prefer explicitinclusion of whatever files are needed.Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qapi: fix error propagation
Don't overwrite / leak previously set errors.Make traversal cope with missing mandatory sub-structs.Don't try to end a container that could not be started.
v1->v2:- unchanged
v2->v3:- instead of examining, assert that we never overwrite errors with...
qapi: introduce "size" type
v1->v2:- fall back to uint64 rather than int
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qapi: input_type_enum(): fix error message
The enum string is pointed to by 'enum_str' not 'name'. This bugcauses the error message to be:
{ "error": { "class": "InvalidParameter", "desc": "Invalid parameter 'null'", "data": { "name": "null" } } }...
qapi: Add Visitor interfaces for uint*_t and int*_t
This adds visitor interfaces for fixed-width integers types.Implementing these in visitors is optional, otherwise we fall back tovisit_type_int() (int64_t) with some additional bounds checking to avoid...
qapi: allow sharing enum implementation across visitors
Most visitors will use the same code for enum parsing. Move it tothe core.
qapi: add QAPI visitor core
Base definitions/includes for Visiter interface used by generatedvisiter/marshalling code.
Includes a GenericList type. Our lists require an embedded element.Since these types are generated, if you want to use them in a different...