From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com,
pbonzini@redhat.com, akong@redhat.com, vilanova@ac.upc.edu
Subject: [Qemu-devel] [PATCH v2 07/12] qapi-visit.py: Clean up a sloppy use of field prefix
Date: Wed, 7 May 2014 09:53:49 +0200 [thread overview]
Message-ID: <1399449234-28501-8-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1399449234-28501-1-git-send-email-armbru@redhat.com>
generate_visit_struct_fields() generates the base type's struct member
name both with and without the field prefix. Harmless, because the
field prefix is always empty there: only unboxed complex members have
a prefix, and those can't have a base type.
Clean it up anyway.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
scripts/qapi-visit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index 222ce62..23ae5f2 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -60,7 +60,7 @@ static void visit_type_%(full_name)s_fields(Visitor *m, %(name)s ** obj, Error *
if base:
ret += mcgen('''
-visit_start_implicit_struct(m, (void**) &(*obj)->%(c_name)s, sizeof(%(type)s), &err);
+visit_start_implicit_struct(m, (void**) &(*obj)->%(c_prefix)s%(c_name)s, sizeof(%(type)s), &err);
if (!err) {
visit_type_%(type)s_fields(m, &(*obj)->%(c_prefix)s%(c_name)s, &err);
error_propagate(errp, err);
--
1.8.1.4
next prev parent reply other threads:[~2014-05-07 7:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 7:53 [Qemu-devel] [PATCH v2 00/12] qapi: Purge error_is_set() Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 01/12] qapi: Update qapi-code-gen.txt example to match current code Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 02/12] qapi: Normalize marshalling's visitor initialization and cleanup Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 03/12] qapi: Remove unused Visitor callbacks start_handle(), end_handle() Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 04/12] qapi: Replace start_optional()/end_optional() by optional() Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 05/12] qapi-visit.py: Clean up confusing push_indent() / pop_indent() use Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 06/12] qapi: Clean up shadowing of parameters and locals in inner scopes Markus Armbruster
2014-05-07 7:53 ` Markus Armbruster [this message]
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 08/12] qapi: Un-inline visit of implicit struct Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 09/12] hmp: Call visit_end_struct() after visit_start_struct() succeeds Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 10/12] hw: Don't call visit_end_struct() after visit_start_struct() fails Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 11/12] tests: " Markus Armbruster
2014-05-07 7:53 ` [Qemu-devel] [PATCH v2 12/12] qapi: Replace uncommon use of the error API by the common one Markus Armbruster
2014-05-15 18:11 ` [Qemu-devel] [PATCH v2 00/12] qapi: Purge error_is_set() Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399449234-28501-8-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=akong@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).