[Qemu-devel] [PATCH v3 3/3] qapi: Suppress unwanted space between type and identifier

2014-04-28 Thread Amos Kong
We always generate a space between type and identifier in parameter and variable declarations, even when idiomatic C style doesn't have a space there. Suppress it. Signed-off-by: Amos Kong ak...@redhat.com --- scripts/qapi.py | 18 +++--- 1 file changed, 11 insertions(+), 7

Re: [Qemu-devel] [PATCH v3 3/3] qapi: Suppress unwanted space between type and identifier

2014-04-28 Thread Paolo Bonzini
Il 28/04/2014 09:02, Amos Kong ha scritto: def mcgen(code, **kwds): -return cgen('\n'.join(code.split('\n')[1:-1]), **kwds) +raw = cgen('\n'.join(code.split('\n')[1:-1]), **kwds) +return re.sub(re.escape(eatspace) + ' +', '', raw) I'd feel a little more confident with ' *' instead

Re: [Qemu-devel] [PATCH v3 3/3] qapi: Suppress unwanted space between type and identifier

2014-04-28 Thread Luiz Capitulino
On Mon, 28 Apr 2014 17:46:41 +0200 Paolo Bonzini pbonz...@redhat.com wrote: Il 28/04/2014 09:02, Amos Kong ha scritto: def mcgen(code, **kwds): -return cgen('\n'.join(code.split('\n')[1:-1]), **kwds) +raw = cgen('\n'.join(code.split('\n')[1:-1]), **kwds) +return

Re: [Qemu-devel] [PATCH v3 3/3] qapi: Suppress unwanted space between type and identifier

2014-04-28 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 28/04/2014 09:02, Amos Kong ha scritto: def mcgen(code, **kwds): -return cgen('\n'.join(code.split('\n')[1:-1]), **kwds) +raw = cgen('\n'.join(code.split('\n')[1:-1]), **kwds) +return re.sub(re.escape(eatspace) + ' +', '', raw) I'd