+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.
+
2014-02-27 Mark Kettenis <kettenis@gnu.org>
* solib-svr4.c (svr4_read_so_list): Initialize first_l_name to 0.
/* This is the CLI ui-out implementation functions vector */
-/* FIXME: This can be initialized dynamically after default is set to
- handle initial output in main.c */
-
-struct ui_out_impl cli_ui_out_impl =
+const struct ui_out_impl cli_ui_out_impl =
{
cli_table_begin,
cli_table_body,
int suppress_output;
};
-extern struct ui_out_impl cli_ui_out_impl;
+extern const struct ui_out_impl cli_ui_out_impl;
extern struct ui_out *cli_out_new (struct ui_file *stream);
/* This is the MI ui-out implementation functions vector */
-/* FIXME: This can be initialized dynamically after default is set to
- handle initial output in main.c */
-
-struct ui_out_impl mi_ui_out_impl =
+static const struct ui_out_impl mi_ui_out_impl =
{
mi_table_begin,
mi_table_body,
{
int flags;
/* Specific implementation of ui-out. */
- struct ui_out_impl *impl;
+ const struct ui_out_impl *impl;
void *data;
/* Current level. */
/* 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,
/* 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);
/* Create a ui_out object */
-extern struct ui_out *ui_out_new (struct ui_out_impl *impl,
+extern struct ui_out *ui_out_new (const struct ui_out_impl *impl,
void *data,
int flags);