Constify wrap_here/wrap_hint code path
Constify the data path between ui_out_wrap_hint and the wrap_indent global, because we can. It's clearer that the argument passed to wrap_hint is not intended to be modified by the ui_out implementation. gdb/ChangeLog: * mi/mi-out.c (mi_wrap_hint): Constify argument. * cli-out.c (cli_wrap_hint): Likewise. * ui-out.c (ui_out_wrap_hint, uo_wrap_hint): Likewise. * ui-out.h (ui_out_wrap_hint, wrap_hint_ftype): Likewise. * utils.c (wrap_here): Likewise. (wrap_indent): Constify. * utils.h (wrap_here): Constify argument.
This commit is contained in:
parent
82bbe65a43
commit
d2c0eef48a
7 changed files with 21 additions and 11 deletions
|
@ -172,7 +172,7 @@ static void uo_text (struct ui_out *uiout, const char *string);
|
|||
static void uo_message (struct ui_out *uiout, int verbosity,
|
||||
const char *format, va_list args)
|
||||
ATTRIBUTE_PRINTF (3, 0);
|
||||
static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
|
||||
static void uo_wrap_hint (struct ui_out *uiout, const char *identstring);
|
||||
static void uo_flush (struct ui_out *uiout);
|
||||
static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream);
|
||||
|
||||
|
@ -505,7 +505,7 @@ ui_out_message (struct ui_out *uiout, int verbosity,
|
|||
}
|
||||
|
||||
void
|
||||
ui_out_wrap_hint (struct ui_out *uiout, char *identstring)
|
||||
ui_out_wrap_hint (struct ui_out *uiout, const char *identstring)
|
||||
{
|
||||
uo_wrap_hint (uiout, identstring);
|
||||
}
|
||||
|
@ -683,7 +683,7 @@ uo_message (struct ui_out *uiout, int verbosity,
|
|||
}
|
||||
|
||||
void
|
||||
uo_wrap_hint (struct ui_out *uiout, char *identstring)
|
||||
uo_wrap_hint (struct ui_out *uiout, const char *identstring)
|
||||
{
|
||||
if (!uiout->impl->wrap_hint)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue