[RFC] constify ui_out_impl
Joel Brobecker
brobecker@adacore.com
Wed Feb 26 21:21:00 GMT 2014
> This patch constifies ui_out_impl in struct ui_out, and various
> instances of ui_out_impl.
>
> This removes a couple of FIXME comments (near cli_ui_out_impl and
> mi_ui_out_impl) that did not make sense to me.
>
> Tested by rebuilding.
>
> 2014-02-26 Tom Tromey <tromey@redhat.com>
>
> * cli-out.c (cli_ui_out_impl): Now const. Remove comment.
> * cli-out.h (cli_ui_out_impl): Now const.
> * mi/mi-out.c (mi_ui_out_impl): Now const. Remove comment.
> * ui-out.c (struct ui_out) <impl>: Now const.
> (default_ui_out_impl): Now const.
> (ui_out_new): Make 'impl' parameter const.
> * ui-out.h (ui_out_new): Update.
Not sure why the RFC, but the patch looks good to me.
For the FIXMEs, they seem to have been inherited from a bulk import
back in 2000, so we might have a tough time explaining them. Not sure
why it would make sense to initialize them dynamically, so I agree
with their removal...
--
Joel
More information about the Gdb-patches
mailing list