summary refs log tree commit diff stats
path: root/scripts/qapi-event.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-05-14 06:50:47 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-14 18:20:29 +0200
commit47299262de424af0cb69965d082e5e70b2314183 (patch)
tree7f295a7ae3004181ec6ca0db2cb55a73bd1bb1fa /scripts/qapi-event.py
parent777abdfe7bb47e582c8eb87dd6cecdf3fd9f86fc (diff)
downloadfocaccia-qemu-47299262de424af0cb69965d082e5e70b2314183.tar.gz
focaccia-qemu-47299262de424af0cb69965d082e5e70b2314183.zip
qapi: Fix C identifiers generated for names containing '.'
c_fun() maps '.' to '_', c_var() doesn't.  Nothing prevents '.' in
QAPI names that get passed to c_var().

Which QAPI names get passed to c_fun(), to c_var(), or to both is not
obvious.  Names of command parameters and struct type members get
passed to c_var().

c_var() strips a leading '*', but this cannot happen.  c_fun()
doesn't.

Fix c_var() to work exactly like c_fun().

Perhaps they should be replaced by a single mapping function.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
[add 'import string']
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Diffstat (limited to 'scripts/qapi-event.py')
0 files changed, 0 insertions, 0 deletions