From patchwork Wed Jun 11 18:53:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 1450 Received: (qmail 18784 invoked by alias); 11 Jun 2014 19:46:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 18771 invoked by uid 89); 11 Jun 2014 19:46:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Jun 2014 19:46:52 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5BIrM95031225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 11 Jun 2014 14:53:23 -0400 Received: from barimba.redhat.com (ovpn-113-103.phx2.redhat.com [10.3.113.103]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5BIrJRJ005158; Wed, 11 Jun 2014 14:53:22 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 5/7] constify complete_line Date: Wed, 11 Jun 2014 12:53:15 -0600 Message-Id: <1402512797-6082-6-git-send-email-tromey@redhat.com> In-Reply-To: <1402512797-6082-1-git-send-email-tromey@redhat.com> References: <1402512797-6082-1-git-send-email-tromey@redhat.com> This changes complete_line to take a const parameter. 2014-06-11 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/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,