git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <junkio@cox.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: [PATCH] Git.pm: Don't #define around die
Date: Sun, 2 Jul 2006 22:57:17 +0200	[thread overview]
Message-ID: <20060702205717.GH29115@pasky.or.cz> (raw)
In-Reply-To: <7v4pxz4yki.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Sun, Jul 02, 2006 at 09:05:33PM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> said that...
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > Error: 'const char *' not in typemap in Git.xs, line 69
> > Error: 'const char *' not in typemap in Git.xs, line 79
> > make: *** [Git.c] Error 1
> >
> > It seems like my typemap starts like this:
> >...
> > So, no "const char *". See next mail for a minimal patch.
> 
> An alternative would be to carry our own typemap but I think
> your fix is less intrusive and fine.  Pasky?

Yes, it should be fine.

> > The warning 
> > (IIRC that was mentioned already on the list) still persists:
> >
> > cc -c -I. -I.. -g -pipe -pipe -fno-common -no-cpp-precomp -flat_namespace 
> > -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -Os     -DVERSION=\"0.01\" 
> > -DXS_VERSION=\"0.01\"  -I/System/Library/Perl/darwin/CORE -I/sw/include 
> > -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR -DNO_STRLCPY 
> > -DGIT_VERSION='"1.4.1.g3b26"' Git.c
> > In file included from /System/Library/Perl/darwin/CORE/perl.h:500,
> >                  from Git.xs:15:
> > /System/Library/Perl/darwin/CORE/embed.h:156:1: warning: "die" redefined
> > Git.xs:11:1: warning: this is the location of the previous definition
> 
> I see the same here.

-8<-

Back in the old days, we called Git's die() from the .xs code, but we had to
hijack Perl's die() for that. Now we don't call Git's die() so no need to do
the hijacking and it silences a compiler warning.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---

 perl/Git.xs |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/perl/Git.xs b/perl/Git.xs
index 51bfac3..1e6c1eb 100644
--- a/perl/Git.xs
+++ b/perl/Git.xs
@@ -8,15 +8,11 @@ #include <ctype.h>
 #include "../cache.h"
 #include "../exec_cmd.h"
 
-#define die perlyshadow_die__
-
 /* XS and Perl interface */
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
 
-#undef die
-
 
 static char *
 report_xs(const char *prefix, const char *err, va_list params)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam

  reply	other threads:[~2006-07-02 20:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-02 21:40 Making perl scripts include the correct Git.pm Petr Baudis
2006-07-03  0:02 ` Junio C Hamano
2006-06-28  0:23   ` Quick merge status updates Junio C Hamano
2006-06-28  5:04     ` Pavel Roskin
2006-06-28  8:49       ` Junio C Hamano
2006-06-28 10:05         ` Pavel Roskin
2006-06-28 10:14           ` Junio C Hamano
2006-07-02 20:49           ` Petr Baudis
2006-07-02 21:33             ` Junio C Hamano
2006-07-02 21:49               ` Petr Baudis
2006-07-02 22:50                 ` Junio C Hamano
2006-07-02 23:49                   ` Junio C Hamano
2006-07-03  0:00                     ` Linus Torvalds
2006-07-03  0:06                       ` Junio C Hamano
2006-07-03 20:29                     ` Petr Baudis
2006-07-03 21:16                       ` [PATCH] Use $GITPERLLIB instead of $RUNNING_GIT_TESTS and centralize @INC munging Petr Baudis
2006-07-08  7:36             ` Quick merge status updates Pavel Roskin
2006-06-28  7:32     ` Johannes Schindelin
2006-06-28  7:39       ` Johannes Schindelin
2006-06-28  8:51         ` Junio C Hamano
2006-06-28  9:13           ` Johannes Schindelin
2006-07-01 23:48         ` [PATCH] Git.pm: Avoid ppport.h Petr Baudis
2006-07-02  9:52           ` Johannes Schindelin
2006-07-02 19:05             ` Junio C Hamano
2006-07-02 20:57               ` Petr Baudis [this message]
2006-07-03  1:38   ` Making perl scripts include the correct Git.pm Junio C Hamano
2006-07-04 19:01     ` Marco Costalba

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=20060702205717.GH29115@pasky.or.cz \
    --to=pasky@suse.cz \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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;
as well as URLs for NNTP newsgroup(s).