From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89817 invoked by alias); 21 Feb 2018 03:46:13 -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 89466 invoked by uid 89); 21 Feb 2018 03:46:13 -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: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Feb 2018 03:46:12 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w1L3k5Tj032132 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Feb 2018 22:46:09 -0500 Received: from [10.0.0.11] (192-222-251-162.qc.cable.ebox.net [192.222.251.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A90151E093; Tue, 20 Feb 2018 22:46:04 -0500 (EST) Subject: Re: [RFA] Remove a cleanup from parse_expression_for_completion To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20180216230212.18553-1-tom@tromey.com> <0cbcbff07cb649201177fa01e92327e0@polymtl.ca> <87k1v846mh.fsf@tromey.com> <87fu5w45jo.fsf@tromey.com> <87bmgj4dhh.fsf@tromey.com> From: Simon Marchi Message-ID: <590b765a-66eb-3f33-2921-8b57d931e90d@polymtl.ca> Date: Wed, 21 Feb 2018 03:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <87bmgj4dhh.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 21 Feb 2018 03:46:05 +0000 X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00275.txt.bz2 On 2018-02-20 03:23 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom Tromey writes: > > Tom> There is a case in here where the NULL/empty string distinction matters. > Tom> So I think we can't use std::string but must instead use > Tom> unique_xmalloc_ptr. I'll update the patch. Woops! > diff --git a/gdb/expression.h b/gdb/expression.h > index 030f2f08e7..59a0898805 100644 > --- a/gdb/expression.h > +++ b/gdb/expression.h > @@ -101,7 +101,8 @@ extern expression_up parse_expression (const char *); > extern expression_up parse_expression_with_language (const char *string, > enum language lang); > > -extern struct type *parse_expression_for_completion (const char *, char **, > +extern struct type *parse_expression_for_completion (const char *, > + gdb::unique_xmalloc_ptr *, This line is now too long. Otherwise it looks good to me. Simon