diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-09-22 15:04:00 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-09-22 15:10:04 +0100 |
commit | 7a5a24f787ecccfb7736f8164fb1c322e77e1219 (patch) | |
tree | 5734049b399de819bdbafac15da019e2975cfb29 /embed.pl | |
parent | 1028dc3c3b25bebb0a1a079d1d384b6dccc2958b (diff) | |
download | perl-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-x | embed.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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)"; |