This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] constify ui_out_impl
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 26 Feb 2014 13:21:39 -0800
- Subject: Re: [RFC] constify ui_out_impl
- Authentication-results: sourceware.org; auth=none
- References: <1393444793-10166-1-git-send-email-tromey at redhat dot com>
> 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