aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/ident-with-escape.out
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-03-17 16:48:29 -0600
committerMarkus Armbruster <armbru@redhat.com>2016-03-18 10:29:25 +0100
commit7599697c66d22ff4c859ba6ccea30e6a9aae6b9b (patch)
treee0a7d31e085b801b539316abd455dda48c2b839d /tests/qapi-schema/ident-with-escape.out
parent4040d995e49c5b818be79e50a18c1bf8d2354d12 (diff)
qapi: Adjust names of implicit types
The original choice of ':obj-' as the prefix for implicit types made it obvious that we weren't going to clash with any user-defined names, which cannot contain ':'. But now we want to create structs for implicit types, to get rid of special cases in the generators, and our use of ':' in implicit names needs a tweak to produce valid C code. We could transliterate ':' to '_', except that C99 mandates that "identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces". So it's time to change our naming convention: we can instead use the 'q_' prefix that we reserved for ourselves back in commit 9fb081e0. Technically, since we aren't planning on exposing the empty type in generated code, we could keep the name ':empty', but renaming it to 'q_empty' makes the check for startswith('q_') cover all implicit types, whether or not code is generated for them. As long as we don't declare 'empty' or 'obj' ticklish, it shouldn't clash with c_name() prepending 'q_' to the user's ticklish names. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1458254921-17042-5-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/ident-with-escape.out')
-rw-r--r--tests/qapi-schema/ident-with-escape.out8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/qapi-schema/ident-with-escape.out b/tests/qapi-schema/ident-with-escape.out
index 453e0b2adb..382ce2fa27 100644
--- a/tests/qapi-schema/ident-with-escape.out
+++ b/tests/qapi-schema/ident-with-escape.out
@@ -1,7 +1,7 @@
-object :empty
-object :obj-fooA-arg
- member bar1: str optional=False
enum QType ['none', 'qnull', 'qint', 'qstring', 'qdict', 'qlist', 'qfloat', 'qbool']
prefix QTYPE
-command fooA :obj-fooA-arg -> None
+command fooA q_obj_fooA-arg -> None
gen=True success_response=True
+object q_empty
+object q_obj_fooA-arg
+ member bar1: str optional=False