Re: [Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 09/29/2015 08:31 AM, Markus Armbruster wrote: >> >> To really cut the verbosity, I figure we'd have to do something more >> radical, like having cgen() recognize a (short!) pattern and replace it >> with a full-blown error check. Not sure that's actually a good idea, >>

Re: [Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 09/29/2015 08:31 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> qapi-commands had a nice helper gen_err_check(), but did not >> >> In fact, it still has :) >> >>> use it everywhere. In fact, using it in more places makes it >>> easier to reduce the lines of

Re: [Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-09-30 Thread Eric Blake
On 09/29/2015 08:31 AM, Markus Armbruster wrote: > > To really cut the verbosity, I figure we'd have to do something more > radical, like having cgen() recognize a (short!) pattern and replace it > with a full-blown error check. Not sure that's actually a good idea, > though :) Another radical i

Re: [Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-09-30 Thread Eric Blake
On 09/29/2015 08:31 AM, Markus Armbruster wrote: > Eric Blake writes: > >> qapi-commands had a nice helper gen_err_check(), but did not > > In fact, it still has :) > >> use it everywhere. In fact, using it in more places makes it >> easier to reduce the lines of code used in appending an error

Re: [Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-09-30 Thread Markus Armbruster
Eric Blake writes: > qapi-commands had a nice helper gen_err_check(), but did not In fact, it still has :) > use it everywhere. In fact, using it in more places makes it > easier to reduce the lines of code used in appending an error Suggest "used for generating error checks" > check in gener

[Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-09-28 Thread Eric Blake
qapi-commands had a nice helper gen_err_check(), but did not use it everywhere. In fact, using it in more places makes it easier to reduce the lines of code used in appending an error check in generated code (previously required a multi-line mcgen(), which didn't add any use of parameterization), w