From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 131002 invoked by alias); 29 Jul 2017 23:40:32 -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 130993 invoked by uid 89); 29 Jul 2017 23:40:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS 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; Sat, 29 Jul 2017 23:40:29 +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 v6TNeNFh019112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 29 Jul 2017 19:40:28 -0400 Received: by simark.ca (Postfix, from userid 112) id 21F5A1EA01; Sat, 29 Jul 2017 19:40:23 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id BB7591E043; Sat, 29 Jul 2017 19:40:22 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 29 Jul 2017 23:40:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA v2 02/24] Introduce and use gdb_file_up In-Reply-To: <20170725172107.9799-3-tom@tromey.com> References: <20170725172107.9799-1-tom@tromey.com> <20170725172107.9799-3-tom@tromey.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Sat, 29 Jul 2017 23:40:23 +0000 X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00436.txt.bz2 Hi Tom, On 2017-07-25 19:20, Tom Tromey wrote: > diff --git a/gdb/common/filestuff.h b/gdb/common/filestuff.h > index b0a811b..3cf2df6 100644 > --- a/gdb/common/filestuff.h > +++ b/gdb/common/filestuff.h > @@ -46,10 +46,23 @@ extern void close_most_fds (void); > extern int gdb_open_cloexec (const char *filename, int flags, > /* mode_t */ unsigned long mode); > > +struct gdb_file_deleter > +{ > + void operator() (FILE *file) const > + { > + fclose (file); > + } > +}; The name could lead people to think that this deletes/unlinks files, don't you think? But other than that, LGTM. Thanks, Simon