Re: [PATCH] Change return type of ui_out redirect to void

Simon Marchi
2017-01-10T16:33:45Z

On 2017-01-10 10:50, Pedro Alves wrote:
> On 01/03/2017 04:17 PM, Simon Marchi wrote:
>
>> Right, now that I re-read it, it does sound funny. Fixed locally to:
>>
>> /* There is a former output pushed on the ui_out_redirect stack.
>> We
>> want to replace it by OUTPUT so we must pop the former value
>> - first. We should either do both the pop and push or to do
>> - neither of it. At least do not try to push OUTPUT if the pop
>> - already failed. */
>> + first. Ideally, we should either do both the pop and push or do
>> + neither of them. */
>>
>> Thanks!
>
> OK with that change.
>
> BTW, also spotted a spurious whitespace after "*" here:
>
> > @@ -163,7 +163,7 @@ class ui_out
> > ATTRIBUTE_PRINTF (2,0) = 0;
> > virtual void do_wrap_hint (const char *identstring) = 0;
> > virtual void do_flush () = 0;
> > - virtual int do_redirect (struct ui_file * outstream) = 0;
> > + virtual void do_redirect (struct ui_file * outstream) = 0;
>
> Thanks,
> Pedro Alves

Oh, right, same in cli-out.h and mi-out.h. I fixed them all and pushed,
thanks.