On 9/13/19 3:13 PM, Markus Armbruster wrote: > Since the previous commit restricted strings to printable ASCII, > \uXXXX's only use is obfuscation. Drop it. > > This leaves \\, \/, \', and \". Since QAPI schema strings are all > names, and names are restricted to ASCII letters, digits, hyphen, and > underscore, none of them is useful. > > The latter three have no test coverage. Drop them. > > Keep \\ to avoid (more) gratuitous incompatibility with JSON. > > Signed-off-by: Markus Armbruster > Reviewed-by: Eric Blake > --- > +++ b/scripts/qapi/common.py > @@ -524,29 +524,9 @@ class QAPISchemaParser(object): > if ch == '\n': > raise QAPIParseError(self, 'Missing terminating "\'"') > if esc: > - elif ch not in '\\/\'"': > + # Note: we recognize only \\ because we have > + # no use for funny characters in strings > + if ch != '\\': > raise QAPIParseError(self, > "Unknown escape \\%s" % ch) Thanks; that comment makes it better than it was in v2. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org