From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8017 invoked by alias); 23 Jul 2017 17:26:40 -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 7997 invoked by uid 89); 23 Jul 2017 17:26:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gproxy9.mail.unifiedlayer.com Received: from gproxy9-pub.mail.unifiedlayer.com (HELO gproxy9.mail.unifiedlayer.com) (69.89.20.122) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 23 Jul 2017 17:26:38 +0000 Received: from cmgw2 (unknown [10.0.90.83]) by gproxy9.mail.unifiedlayer.com (Postfix) with ESMTP id D38691E07B0 for ; Sun, 23 Jul 2017 11:26:36 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw2 with id oHSZ1v00V2f2jeq01HScTr; Sun, 23 Jul 2017 11:26:36 -0600 X-Authority-Analysis: v=2.2 cv=IqBuSP3g c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=G3gG6ho9WtcA:10 a=20KFwNOVAAAA:8 a=CU8KsgpGFmXVWvclKdkA:9 Received: from c-67-176-62-53.hsd1.co.comcast.net ([67.176.62.53]:41754 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dZKeH-0039pj-98; Sun, 23 Jul 2017 11:26:33 -0600 From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 22/23] Make gdb_buildargv return a unique pointer References: <20170503224626.2818-1-tom@tromey.com> <20170503224626.2818-23-tom@tromey.com> <1b605c61-d219-5ecc-c68f-91f76ed3cf65@redhat.com> Date: Sun, 23 Jul 2017 17:26:00 -0000 In-Reply-To: <1b605c61-d219-5ecc-c68f-91f76ed3cf65@redhat.com> (Pedro Alves's message of "Mon, 5 Jun 2017 17:21:43 +0100") Message-ID: <87o9sbkqt3.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Exim-ID: 1dZKeH-0039pj-98 X-Source-Sender: c-67-176-62-53.hsd1.co.comcast.net (bapiya) [67.176.62.53]:41754 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes X-SW-Source: 2017-07/txt/msg00339.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> I suspect that making gdb_argv_up a class (class gdb_argv) that wraps Pedro> the array instead of making it a unique pointer may make users a Pedro> little bit clearer. I.e., gdb_buildargv would be converted to a Pedro> ctor, and we'd add e.g., a "count()" and "release()" methods. I did this. It does clean things up a bit, particularly since we can provide begin/end methods and then use foreach to iterate in some cases. Tom