diff options
author | Laszlo Ersek <lersek@redhat.com> | 2012-07-17 16:17:07 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-07-23 11:55:17 +0100 |
commit | 092705d4eb6779060661c8d521d0314e9571773f (patch) | |
tree | 9697234d18f92997e766f57cbfadfd67fb9f8efe /qapi/qapi-visit-core.c | |
parent | c46f18ce2b6dae531d72f61cf8441110c7936e70 (diff) |
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>
Diffstat (limited to 'qapi/qapi-visit-core.c')
-rw-r--r-- | qapi/qapi-visit-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index d41595eaa1..7a82b63766 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -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)) { |