[PATCH 5/7] constify complete_line

Tom Tromey
2014-06-11T19:46:54Z

This changes complete_line to take a const parameter.

2014-06-11 Tom Tromey <tromey@redhat.com>

* 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/completer.c b/gdb/completer.c
index 94f70a9..64b146b 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 5b90773..7aa0f3b 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,
--
1.9.3