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>
This commit is contained in:
Laszlo Ersek 2012-07-17 16:17:07 +02:00 committed by Stefan Hajnoczi
parent c46f18ce2b
commit 092705d4eb
3 changed files with 12 additions and 0 deletions

View file

@ -234,6 +234,13 @@ void visit_type_int64(Visitor *v, int64_t *obj, const char *name, Error **errp)
}
}
void visit_type_size(Visitor *v, uint64_t *obj, const char *name, Error **errp)
{
if (!error_is_set(errp)) {
(v->type_size ? v->type_size : v->type_uint64)(v, obj, name, errp);
}
}
void visit_type_bool(Visitor *v, bool *obj, const char *name, Error **errp)
{
if (!error_is_set(errp)) {