summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-08-07 16:16:00 +0200
committerNicholas Clark <nick@ccl4.org>2011-08-07 16:16:00 +0200
commit5f9c653531784e662e71052c2739c67e786c87f3 (patch)
tree3268655ea30917ae583abd0ca091189853883d44 /regen
parentadf34b4b4a293cee5d4f61b17ac556417fa34709 (diff)
downloadperl-5f9c653531784e662e71052c2739c67e786c87f3.tar.gz
In embed.pl, inline hide() and bincompat_var() into their only call point.
hide() has only been used by bincompat_var() since commit acfe0abcedaf592f in 2001, and bincompat_var() only used in one place at the top level since commit 87b9e16005b9e39b in 2010.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/embed.pl14
1 files changed, 2 insertions, 12 deletions
diff --git a/regen/embed.pl b/regen/embed.pl
index fa9c1686ad..232af368c2 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -380,11 +380,6 @@ sub readvars {
my @intrp = readvars 'intrpvar.h','I';
my @globvar = readvars 'perlvars.h','G';
-sub undefine ($) {
- my ($sym) = @_;
- "#undef $sym\n";
-}
-
sub hide {
my ($from, $to, $indent) = @_;
$indent = '' unless defined $indent;
@@ -392,12 +387,6 @@ sub hide {
"#${indent}define $from" . "\t" x ($t < 3 ? 3 - $t : 1) . "$to\n";
}
-sub bincompat_var ($$) {
- my ($pfx, $sym) = @_;
- my $arg = ($pfx eq 'G' ? 'NULL' : 'aTHX');
- undefine("PL_$sym") . hide("PL_$sym", "(*Perl_${pfx}${sym}_ptr($arg))");
-}
-
sub multon ($$$) {
my ($sym,$pre,$ptr) = @_;
hide("PL_$sym", "($ptr$pre$sym)");
@@ -741,7 +730,8 @@ END_EXTERN_C
EOT
foreach $sym (@globvar) {
- print $capih bincompat_var('G',$sym);
+ print $capih
+ "#undef PL_$sym\n" . hide("PL_$sym", "(*Perl_G${sym}_ptr(NULL))");
}
print $capih <<'EOT';