From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, mdroth@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH 2/4] qobject-input-visitor: Document full_name_nth()
Date: Thu, 27 Apr 2017 10:41:24 +0200 [thread overview]
Message-ID: <1493282486-28338-3-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1493282486-28338-1-git-send-email-armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
qapi/qobject-input-visitor.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c
index 865e948..2530959 100644
--- a/qapi/qobject-input-visitor.c
+++ b/qapi/qobject-input-visitor.c
@@ -55,6 +55,17 @@ static QObjectInputVisitor *to_qiv(Visitor *v)
return container_of(v, QObjectInputVisitor, visitor);
}
+/*
+ * Find the full name of something @qiv is currently visiting.
+ * @qiv is visiting something named @name in the stack of containers
+ * @qiv->stack.
+ * If @n is zero, return its full name.
+ * If @n is positive, return the full name of the @n-th container
+ * counting from the top. The stack of containers must have at least
+ * @n elements.
+ * The returned string is valid until the next full_name_nth(@v) or
+ * destruction of @v.
+ */
static const char *full_name_nth(QObjectInputVisitor *qiv, const char *name,
int n)
{
--
2.7.4
next prev parent reply other threads:[~2017-04-27 8:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 8:41 [Qemu-devel] [PATCH 0/4] qapi: Loose ends Markus Armbruster
2017-04-27 8:41 ` [Qemu-devel] [PATCH 1/4] qmp: Improve QMP dispatch error messages Markus Armbruster
2017-04-27 9:06 ` Marc-André Lureau
2017-05-02 13:14 ` Philippe Mathieu-Daudé
2017-04-27 8:41 ` Markus Armbruster [this message]
2017-04-27 9:06 ` [Qemu-devel] [PATCH 2/4] qobject-input-visitor: Document full_name_nth() Marc-André Lureau
2017-04-27 8:41 ` [Qemu-devel] [PATCH 3/4] qapi: Document intended use of @name within alternate visits Markus Armbruster
2017-04-27 9:06 ` Marc-André Lureau
2017-04-27 8:41 ` [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list Markus Armbruster
2017-04-27 9:06 ` Marc-André Lureau
2017-04-27 10:49 ` Markus Armbruster
2017-04-27 10:56 ` Marc-André Lureau
2017-04-27 11:50 ` Markus Armbruster
2017-04-27 13:13 ` Eric Blake
2017-04-27 14:02 ` Markus Armbruster
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=1493282486-28338-3-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/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).