From 5f9c653531784e662e71052c2739c67e786c87f3 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 7 Aug 2011 16:16:00 +0200 Subject: [PATCH] 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. --- regen/embed.pl | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/regen/embed.pl b/regen/embed.pl index fa9c168..232af36 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'; -- 1.8.3.1