From 5b5f825d44306b18509cd10ba9ac6983e90d6e0f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 24 Aug 2017 10:46:07 +0200 Subject: qapi: Generate FOO_str() macro for QAPI enum FOO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The next commit will put it to use. May look pointless now, but we're going to change the FOO_lookup's type, and then it'll help. Signed-off-by: Markus Armbruster Message-Id: <1503564371-26090-13-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau --- docs/devel/qapi-code-gen.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt index ae05327..f04c63f 100644 --- a/docs/devel/qapi-code-gen.txt +++ b/docs/devel/qapi-code-gen.txt @@ -1275,6 +1275,9 @@ Example: EXAMPLE_QAPI_EVENT__MAX = 1, } example_QAPIEvent; + #define example_QAPIEvent_str(val) \ + qapi_enum_lookup(example_QAPIEvent_lookup, (val)) + extern const char *const example_QAPIEvent_lookup[]; #endif -- cgit v1.1