From f728784643460445f91833d46f0c8bf60beb6583 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Sun, 8 May 2005 12:19:51 +0000 Subject: [PATCH] Tweak the insertion of __attribute__((nonnull())) declarations in proto.h so it compiles with and without threads with gcc 3.4 p4raw-id: //depot/perl@24416 --- embed.pl | 19 +- proto.h | 945 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 827 insertions(+), 137 deletions(-) diff --git a/embed.pl b/embed.pl index 39bd429..6487ff4 100755 --- a/embed.pl +++ b/embed.pl @@ -212,8 +212,23 @@ sub write_protos { } $ret .= "\n\t\t\t__attribute__((nonnull))" if $flags =~ /N/; if ( @nonnull ) { - my @pos = map { $has_context ? "pTHX_ $_" : $_ } @nonnull; - $ret .= sprintf( "\n\t\t\t__attribute__((nonnull(%s)))", join( ",", @pos ) ); + if ($has_context) { + my @pos = map { $has_context ? $_ + 1 : $_ } @nonnull; + $ret .= sprintf( <