summary refs log tree commit diff stats
path: root/scripts/qapi/gen.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-03-23 10:40:07 +0100
committerMarkus Armbruster <armbru@redhat.com>2021-03-23 22:30:51 +0100
commiteaab06faa5540e02e4f4782c1a650c9805a36671 (patch)
treeb2603475c29726bf34c554f4c93832f72ff366b0 /scripts/qapi/gen.py
parent0825f62c842f2c07c5471391c6d7fd3f4fe83732 (diff)
downloadfocaccia-qemu-eaab06faa5540e02e4f4782c1a650c9805a36671.tar.gz
focaccia-qemu-eaab06faa5540e02e4f4782c1a650c9805a36671.zip
qapi: Rework name checking in preparation of stricter checking
Naming rules differ for the various kinds of names.  To prepare
enforcing them, define functions to check them: check_name_upper(),
check_name_lower(), and check_name_camel().  For now, these merely
wrap around check_name_str(), but that will change shortly.  Replace
the other uses of check_name_str() by appropriate uses of the
wrappers.  No change in behavior just yet.

check_name_str() now returns the name without downstream and x-
prefix, for use by the wrappers in later patches.  Requires tweaking
regexp @valid_name.  It accepts the same strings as before.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-11-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message improved]
Diffstat (limited to 'scripts/qapi/gen.py')
0 files changed, 0 insertions, 0 deletions