aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi-visit.py
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-05-14 06:50:55 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-14 18:21:07 +0200
commitc6405b54b7b09a876f2f2fba2aa6f8ac87189cb9 (patch)
tree7f31f4fcaa1eac6f58fed9c3f961f54af6b049f6 /scripts/qapi-visit.py
parentd557344628e32771f07e5b6a2a818ee3d8e7a65f (diff)
qapi: Make c_type() consistently convert qapi names
Continuing the string of cleanups for supporting downstream names containing '.', this patch focuses on ensuring c_type() can handle a downstream name. This patch alone does not fix the places where generator output should be calling this function but was open-coding things instead, but it gets us a step closer. In particular, the changes to c_list_type() and type_name() mean that type_name(FOO) now handles the case when FOO contains '.', '-', or is a ticklish identifier other than a builtin (builtins are exempted because ['int'] must remain mapped to 'intList' and not 'q_intList'). Meanwhile, ['unix'] now maps to 'q_unixList' rather than 'unixList', to match the fact that 'unix' is ticklish; however, our naming conventions state that complex types should start with a capital, so no type name following conventions will ever have the 'q_' prepended. Likewise, changes to c_type() mean that c_type(FOO) properly handles an enum or complex type FOO with '.' or '-' in the name, or is a ticklish identifier (again, a ticklish identifier as a type name violates conventions). Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi-visit.py')
0 files changed, 0 insertions, 0 deletions