summaryrefslogtreecommitdiff
path: root/embed.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-09-22 15:04:00 +0100
committerNicholas Clark <nick@ccl4.org>2010-09-22 15:10:04 +0100
commit7a5a24f787ecccfb7736f8164fb1c322e77e1219 (patch)
tree5734049b399de819bdbafac15da019e2975cfb29 /embed.pl
parent1028dc3c3b25bebb0a1a079d1d384b6dccc2958b (diff)
downloadperl-7a5a24f787ecccfb7736f8164fb1c322e77e1219.tar.gz
Emit $_ to Perl_$_ for "nocontext" functions under multiplicity.
(Strictly for all functions with variable arguments, but *no* explicit interpreter context arguments. Most of these are *_nocontext.) We're already emitting macros for the non-multiplicity case, and as these functions don't need an aTHX_ adding, there's no C portability reason why we can't generate them here too. So do so, for consistency.
Diffstat (limited to 'embed.pl')
-rwxr-xr-xembed.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/embed.pl b/embed.pl
index ccc6f3aa78..0f3b8071dd 100755
--- a/embed.pl
+++ b/embed.pl
@@ -517,10 +517,7 @@ walk_table {
my ($flags,$retval,$func,@args) = @_;
unless ($flags =~ /[om]/) {
my $args = scalar @args;
- if ($args and $args[$args-1] =~ /\.\.\./) {
- # we're out of luck for varargs functions under CPP
- }
- elsif ($flags =~ /n/) {
+ if ($flags =~ /n/) {
if ($flags =~ /s/) {
$ret .= hide($func,"S_$func");
}
@@ -528,6 +525,9 @@ walk_table {
$ret .= hide($func,"Perl_$func");
}
}
+ elsif ($args and $args[$args-1] =~ /\.\.\./) {
+ # we're out of luck for varargs functions under CPP
+ }
else {
my $alist = join(",", @az[0..$args-1]);
$ret = "#define $func($alist)";