Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Joel Brobecker <brobecker@adacore.com>,  gdb-patches@sourceware.org
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	[thread overview]
Message-ID: <200810250336.30073.pedro@codesourcery.com> (raw)
In-Reply-To: <20081025015805.GA1484@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

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

[-- Attachment #2: trans_xfree.diff --]
[-- Type: text/x-diff, Size: 1111 bytes --]

2008-10-25  Pedro Alves  <pedro@codesourcery.com>

	* 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 $@ && \

  reply	other threads:[~2008-10-25  2:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 22:58 Pedro Alves
2008-10-25  0:14 ` Joel Brobecker
2008-10-25  1:58   ` Daniel Jacobowitz
2008-10-25  2:37     ` Pedro Alves [this message]
2008-10-25  6:33       ` Daniel Jacobowitz
2008-10-25 15:54       ` Joel Brobecker
2008-10-27 11:48         ` Pedro Alves
2008-10-27 22:38           ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810250336.30073.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox