summaryrefslogtreecommitdiff
path: root/embed.pl
diff options
context:
space:
mode:
Diffstat (limited to 'embed.pl')
-rwxr-xr-xembed.pl19
1 files changed, 2 insertions, 17 deletions
diff --git a/embed.pl b/embed.pl
index 6487ff4ae0..50ec17faf3 100755
--- a/embed.pl
+++ b/embed.pl
@@ -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/;