Received: from eggs.gnu.org ([2001:4830:134:3::10]:51124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHJZr-0007Ui-OV for qemu-devel@nongnu.org; Thu, 07 Jan 2016 18:02:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHJZo-0005z2-Go for qemu-devel@nongnu.org; Thu, 07 Jan 2016 18:02:43 -0500 Received: from resqmta-po-05v.sys.comcast.net ([2001:558:fe16:19:96:114:154:164]:40436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHJZo-0005yq-Bd for qemu-devel@nongnu.org; Thu, 07 Jan 2016 18:02:40 -0500 From: Eric Blake Date: Thu, 7 Jan 2016 16:02:33 -0700 Message-Id: <1452207753-11183-1-git-send-email-eblake@redhat.com> In-Reply-To: <1450717720-9627-35-git-send-email-eblake@redhat.com> References: <1450717720-9627-35-git-send-email-eblake@redhat.com> Subject: [Qemu-devel] [PATCH v8 34/35] fixup! qapi: Change visit_type_FOO() to no longer return partial objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, armbru@redhat.com, Michael Roth [no change in commit message] --- v9: fix bug in use of errp v8: rebase to earlier changes v7: rebase to earlier changes, enhance commit message, also fix visit_type_str() and visit_type_any() v6: rebase on top of earlier doc and formatting improvements, mention that *obj can be uninitialized on entry to an input visitor, rework semantics to keep valgrind happy on uninitialized input, break some long lines --- qapi/qapi-visit-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 977df85..259e0cb 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -2,7 +2,7 @@ * Core Definitions for QAPI Visitor Classes * * Copyright IBM, Corp. 2011 - * Copyright (C) 2015 Red Hat, Inc. + * Copyright (C) 2015-2016 Red Hat, Inc. * * Authors: * Anthony Liguori @@ -253,7 +253,7 @@ void visit_type_str(Visitor *v, const char *name, char **obj, Error **errp) assert(*obj); } */ - v->type_str(v, name, obj, errp); + v->type_str(v, name, obj, &err); if (!visit_is_output(v) && err) { *obj = NULL; } @@ -275,7 +275,7 @@ void visit_type_any(Visitor *v, const char *name, QObject **obj, Error **errp) if (visit_is_output(v)) { assert(*obj); } - v->type_any(v, name, obj, errp); + v->type_any(v, name, obj, &err); if (!visit_is_output(v) && err) { *obj = NULL; } -- 2.4.3