forked from Imagelibrary/binutils-gdb
constify ui_out_impl
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-28 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.
This commit is contained in:
@@ -102,7 +102,7 @@ struct ui_out
|
||||
{
|
||||
int flags;
|
||||
/* Specific implementation of ui-out. */
|
||||
struct ui_out_impl *impl;
|
||||
const struct ui_out_impl *impl;
|
||||
void *data;
|
||||
|
||||
/* Current level. */
|
||||
@@ -198,7 +198,7 @@ static void default_data_destroy (struct ui_out *uiout);
|
||||
|
||||
/* This is the default ui-out implementation functions vector. */
|
||||
|
||||
struct ui_out_impl default_ui_out_impl =
|
||||
const struct ui_out_impl default_ui_out_impl =
|
||||
{
|
||||
default_table_begin,
|
||||
default_table_body,
|
||||
@@ -1095,7 +1095,7 @@ ui_out_query_field (struct ui_out *uiout, int colno,
|
||||
/* Initalize private members at startup. */
|
||||
|
||||
struct ui_out *
|
||||
ui_out_new (struct ui_out_impl *impl, void *data,
|
||||
ui_out_new (const struct ui_out_impl *impl, void *data,
|
||||
int flags)
|
||||
{
|
||||
struct ui_out *uiout = XNEW (struct ui_out);
|
||||
|
||||
Reference in New Issue
Block a user