From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77071 invoked by alias); 2 Apr 2018 02:35:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 77059 invoked by uid 89); 2 Apr 2018 02:35:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Apr 2018 02:35:51 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3536D1E4B2; Sun, 1 Apr 2018 22:35:49 -0400 (EDT) Subject: Re: [RFA 08/10] More use of std::vector in linespec.c To: Tom Tromey , gdb-patches@sourceware.org References: <20180401163539.15314-1-tom@tromey.com> <20180401163539.15314-9-tom@tromey.com> From: Simon Marchi Message-ID: <9fe97b40-59da-4b51-fc1c-76fe1619353f@simark.ca> Date: Mon, 02 Apr 2018 02:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180401163539.15314-9-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-04/txt/msg00035.txt.bz2 On 2018-04-01 12:35 PM, Tom Tromey wrote: > This changes some spots in linespec.c to take a std::vector. This > patch spilled out to objc-lang.c a bit as well. This change allows > for the removal of some cleanups. > > 2018-03-31 Tom Tromey > > * utils.c (compare_strings): Remove. > * utils.h (compare_strings): Remove. > * objc-lang.h (find_imps): Update. > * objc-lang.c (find_methods): Take a std::vector. > (uniquify_strings, find_imps): Likewise. > * linespec.c (find_methods): Take a std::vector. > (decode_objc): Use std::vector. > (add_all_symbol_names_from_pspace, find_superclass_methods): Take > a std::vector. > (find_method, find_function_symbols): Use std::vector. > --- > gdb/ChangeLog | 13 +++++++++++++ > gdb/linespec.c | 47 ++++++++++++++++++----------------------------- > gdb/objc-lang.c | 44 ++++++++++++-------------------------------- > gdb/objc-lang.h | 4 ++-- > gdb/utils.c | 11 ----------- > gdb/utils.h | 1 - > 6 files changed, 45 insertions(+), 75 deletions(-) > > diff --git a/gdb/linespec.c b/gdb/linespec.c > index 48168eaaa6..96a3117293 100644 > --- a/gdb/linespec.c > +++ b/gdb/linespec.c > @@ -379,7 +379,7 @@ static void add_matching_symbols_to_info (const char *name, > > static void add_all_symbol_names_from_pspace (struct collect_info *info, > struct program_space *pspace, > - VEC (const_char_ptr) *names, > + const std::vector &names, This line is now too long, otherwise LGTM. Simon