[virt-tools-list] [PATCH v5 1/3] Port to GtkApplication API's
Eduardo Lima (Etrunko)
etrunko at redhat.com
Wed Feb 17 16:37:17 UTC 2016
On 02/17/2016 01:22 PM, Jonathon Jongsma wrote:
>>> I disagree, but again, I think it is basically a matter of
>>> preference.
>>
>> It is. From the macro name it is not clear for me how is different
>> "GOTO_END" from "goto end"
>
> For what it's worth, I agree with Pavel here. I think it actually obscures
> things instead of making them clearer.
>
>
Well I think that's already a part of our day-to-day coding, we are
using GObjects all over the place after all. Macros do have their value
if used correctly, and I think this one is a perfect example.
So, what do you think about this "improved" one I proposed? If you say
you don't like it, I can change it without problems.
>>
>>> Looking at it again, I could improve this macro a bit more, by moving
>>> the g_printerr() call inside and receive the message as a parameter:
>>
>> any improvements welcome
>>
>> Pavel
>>
>>>
>>> +#define ERROR_GOTO_END(x, ...) \
>>> + do { \
>>> + g_printerr(x, ## __VA_ARGS__); \
>>> + ret = TRUE; \
>>> + *status = 1; \
>>> + goto end; \
>>> + } while (FALSE)
>>> +
>>>
>>> Regards, Eduardo.
>>>
>>
>> _______________________________________________
>> virt-tools-list mailing list
>> virt-tools-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/virt-tools-list
--
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko at redhat.com
More information about the virt-tools-list
mailing list