From 1834676b5f9a7f425b68d181da85f96fe246e03b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 15 Apr 2013 10:22:12 -0600 Subject: [PATCH] constify complete_line This changes complete_line to take a const parameter. 2014-06-18 Tom Tromey * completer.c (complete_line): Make "line_buffer" const. * completer.h (complete_line): Update. --- gdb/ChangeLog | 5 +++++ gdb/completer.c | 2 +- gdb/completer.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f34f6dcb2ae..64351cb1043 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-06-18 Tom Tromey + + * completer.c (complete_line): Make "line_buffer" const. + * completer.h (complete_line): Update. + 2014-06-18 Tom Tromey * symtab.c (add_macro_name): Remove unneeded cast. diff --git a/gdb/completer.c b/gdb/completer.c index 94f70a99f22..64b146bd0f2 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -772,7 +772,7 @@ complete_line_internal (const char *text, should pretend that the line ends at POINT. */ VEC (char_ptr) * -complete_line (const char *text, char *line_buffer, int point) +complete_line (const char *text, const char *line_buffer, int point) { return complete_line_internal (text, line_buffer, point, handle_completions); diff --git a/gdb/completer.h b/gdb/completer.h index 5b90773f61d..7aa0f3bea9e 100644 --- a/gdb/completer.h +++ b/gdb/completer.h @@ -20,7 +20,7 @@ #include "gdb_vecs.h" extern VEC (char_ptr) *complete_line (const char *text, - char *line_buffer, + const char *line_buffer, int point); extern char *readline_line_completion_function (const char *text, -- 2.30.2