Re: [Qemu-devel] [PATCH 07/26] qapi: add 'if' condition on top-level schema elements

2017-08-23 Thread Eduardo Habkost
On Tue, Aug 22, 2017 at 06:52:19PM +0200, Markus Armbruster wrote: > Marc-André Lureau writes: [...] > >>> +def func_wrapper(self, *args, **kwargs): > >>> +funcname = self.__class__.__name__ + '.' + func.__name__ > >>> +ifcond = args[-1] > >>> +save = {} > >>> +

Re: [Qemu-devel] [PATCH 07/26] qapi: add 'if' condition on top-level schema elements

2017-08-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Wed, Aug 16, 2017 at 5:43 PM, Markus Armbruster wrote: >> Marc-André Lureau writes: >> >>> Add 'if' c-preprocessor condition on top-level schema elements: >>> struct, enum, union, alternate, command, event. >> >> An example would be useful here. Your cover

Re: [Qemu-devel] [PATCH 07/26] qapi: add 'if' condition on top-level schema elements

2017-08-22 Thread Marc-André Lureau
Hi On Wed, Aug 16, 2017 at 5:43 PM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> Add 'if' c-preprocessor condition on top-level schema elements: >> struct, enum, union, alternate, command, event. > > An example would be useful here. Your cover letter has nice ones, would > be a sha

Re: [Qemu-devel] [PATCH 07/26] qapi: add 'if' condition on top-level schema elements

2017-08-17 Thread Markus Armbruster
Marc-André Lureau writes: > Add 'if' c-preprocessor condition on top-level schema elements: > struct, enum, union, alternate, command, event. > > Variants objects types are created outside of #if blocks, since they > may be shared by various types. Even if unused, this shouldn't be an > issue, si

Re: [Qemu-devel] [PATCH 07/26] qapi: add 'if' condition on top-level schema elements

2017-08-16 Thread Markus Armbruster
Markus Armbruster writes: [...] > Out of review brainpower for today. Hope to resume tomorrow. > > [...] Nope, I'm giving up on this one. Please split it for reviewability. Suggested split: 1. Preparatory refactoring for step 2, step by step 2. Frontend part: accept and check 'if', step by s

Re: [Qemu-devel] [PATCH 07/26] qapi: add 'if' condition on top-level schema elements

2017-08-16 Thread Markus Armbruster
Marc-André Lureau writes: > Add 'if' c-preprocessor condition on top-level schema elements: > struct, enum, union, alternate, command, event. An example would be useful here. Your cover letter has nice ones, would be a shame not to preserve them for posterity in the commit log. > Variants obje

[Qemu-devel] [PATCH 07/26] qapi: add 'if' condition on top-level schema elements

2017-07-27 Thread Marc-André Lureau
Add 'if' c-preprocessor condition on top-level schema elements: struct, enum, union, alternate, command, event. Variants objects types are created outside of #if blocks, since they may be shared by various types. Even if unused, this shouldn't be an issue, since those are internal types. Note tha