diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-09 07:29:33 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-09 07:29:33 +0000 |
commit | 3d42dc86375a150e698f9a14ae6be7a37e2ed575 (patch) | |
tree | c57e2739675c5a89af6b877d4ce7483c976ee5d6 /embed.pl | |
parent | ce5030a2e3d52efc311b379279a2db8219fc84b1 (diff) | |
download | perl-3d42dc86375a150e698f9a14ae6be7a37e2ed575.tar.gz |
Revert to Andy's first solution for nonnull attributes;
add the missing defines for non-threaded perls in perl.h
p4raw-id: //depot/perl@24421
Diffstat (limited to 'embed.pl')
-rwxr-xr-x | embed.pl | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -212,23 +212,8 @@ sub write_protos { } $ret .= "\n\t\t\t__attribute__((nonnull))" if $flags =~ /N/; if ( @nonnull ) { - if ($has_context) { - my @pos = map { $has_context ? $_ + 1 : $_ } @nonnull; - $ret .= sprintf( <<ATTR, - -#ifdef USE_ITHREADS - __attribute__((nonnull(%s))) -#else - __attribute__((nonnull(%s))) -#endif -ATTR - join( ",", @pos ), - join( ",", @nonnull ), - ); - } - else { - $ret .= sprintf( "\n\t\t\t__attribute__((nonnull(%s)))", join( ",", @nonnull ) ); - } + my @pos = map { $has_context ? "pTHX_$_" : $_ } @nonnull; + $ret .= sprintf( "\n\t\t\t__attribute__((nonnull(%s)))", join( ",", @pos ) ); } $ret .= ";"; $ret .= ' */' if $flags =~ /m/; |