From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10271 invoked by alias); 25 Oct 2008 02:37:23 -0000 Received: (qmail 10261 invoked by uid 22791); 25 Oct 2008 02:37:23 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 25 Oct 2008 02:36:27 +0000 Received: (qmail 8538 invoked from network); 25 Oct 2008 02:36:24 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 25 Oct 2008 02:36:24 -0000 From: Pedro Alves To: Daniel Jacobowitz Subject: Re: A couple of uses of xmalloc and xfree in a couple of .y files Date: Sat, 25 Oct 2008 02:37:00 -0000 User-Agent: KMail/1.9.9 Cc: Joel Brobecker , gdb-patches@sourceware.org References: <200810242358.11089.pedro@codesourcery.com> <20081025001350.GC29998@adacore.com> <20081025015805.GA1484@caradoc.them.org> In-Reply-To: <20081025015805.GA1484@caradoc.them.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_uYoAJypiA2m08B3" Message-Id: <200810250336.30073.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2008-10/txt/msg00630.txt.bz2 --Boundary-00=_uYoAJypiA2m08B3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 806 On Saturday 25 October 2008 01:13:50, Joel Brobecker wrote: > > Anything I'm missing preventing me from applying this as obvious? > > Yes, I think we should be consistent. Thanks for confirming. I've checked it in. On Saturday 25 October 2008 02:58:05, Daniel Jacobowitz wrote: > On Fri, Oct 24, 2008 at 05:13:50PM -0700, Joel Brobecker wrote: > > The thing I don't get is why we don't translate free->xfree, though. > > I think the sed rule predates our copy of xfree. Yeah, from the ChangeLogs it seems so. Also, free is a word that easilly can appear anywhere. Most notably: "This program is xfree software" :-) Don't think it matters anywhere else, though. We also have have things like, obstack_free The attached seems to work OK in all cases here. Do we want this ? -- Pedro Alves --Boundary-00=_uYoAJypiA2m08B3 Content-Type: text/x-diff; charset="iso-8859-1"; name="trans_xfree.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="trans_xfree.diff" Content-length: 1111 2008-10-25 Pedro Alves * Makefile.in (.y.c, .l.c): sed free to xfree. --- gdb/Makefile.in | 4 ++++ 1 file changed, 4 insertions(+) Index: src/gdb/Makefile.in =================================================================== --- src.orig/gdb/Makefile.in 2008-10-25 03:14:41.000000000 +0100 +++ src/gdb/Makefile.in 2008-10-25 03:26:34.000000000 +0100 @@ -1470,6 +1470,8 @@ po/$(PACKAGE).pot: force -e '/include.*malloc.h/d' \ -e 's/\([^x]\)malloc/\1xmalloc/g' \ -e 's/\([^x]\)realloc/\1xrealloc/g' \ + -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ + -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ -e '/^#line.*y.tab.c/d' \ < $@.tmp > $@.new -rm $@.tmp @@ -1484,6 +1486,8 @@ po/$(PACKAGE).pot: force -e '/include.*malloc.h/d' \ -e 's/\([^x]\)malloc/\1xmalloc/g' \ -e 's/\([^x]\)realloc/\1xrealloc/g' \ + -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ + -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ -e 's/yy_flex_xrealloc/yyxrealloc/g' \ < $@ > $@.new && \ rm -f $@ && \ --Boundary-00=_uYoAJypiA2m08B3--