diff mbox series

[PULL,12/29] qapi: Consistently permit any case in downstream prefixes

Message ID 20210323215658.3840228-13-armbru@redhat.com
State New
Headers show
Series [PULL,01/29] qapi/pragma: Tidy up after removal of deprecated commands | expand

Commit Message

Markus Armbruster March 23, 2021, 9:56 p.m. UTC
We require lowercase __RFQDN_ downstream prefixes only where we
require the prefixed name to be lowercase.  Don't; permit any case in
__RFQDN_ prefixes anywhere.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-13-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
 scripts/qapi/expr.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index a815060ee2..b5fb0be48b 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -51,7 +51,7 @@  def check_name_upper(name, info, source):
 def check_name_lower(name, info, source,
     stem = check_name_str(name, info, source)
-    if not permit_upper and name.lower() != name:
+    if not permit_upper and re.search(r'[A-Z]', stem):
         raise QAPISemError(
             info, "%s uses uppercase in name" % source)
     # TODO reject '_' in stem