X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=embed.pl;h=a7fb0eda3b10c30b6ad916a3baa2ff1b86eb802d;hb=6cef1e77274f883a8b06f0546efeff6e6b8660d8;hp=ca489c5b2f2434f75972432164ca2f8280792a51;hpb=8f8722428a3062985b7d543348f72ccabf60a063;p=p5sagit%2Fp5-mst-13.2.git diff --git a/embed.pl b/embed.pl index ca489c5..a7fb0ed 100755 --- a/embed.pl +++ b/embed.pl @@ -2,6 +2,25 @@ require 5.003; +# XXX others that may need adding +# warnhook +# hints +# copline +my @extvars = qw(sv_undef sv_yes sv_no na dowarn + curcop compiling + tainting tainted stack_base stack_sp sv_arenaroot + curstash DBsub DBsingle debstash + rsfp + stdingv + defgv + errgv + rsfp_filters + perldb + diehook + dirty + perl_destruct_level + ); + sub readsyms (\%$) { my ($syms, $file) = @_; %$syms = (); @@ -98,8 +117,7 @@ sub multon ($$$) { } sub multoff ($$) { my ($sym,$pre) = @_; -# hide("$pre$sym", "PL_$sym"); - return ''; + return hide("PL_$pre$sym", "PL_$sym"); } unlink 'embed.h'; @@ -256,7 +274,7 @@ print EM <<'END'; END for $sym (sort keys %globvar) { - print EM multon($sym,'G','Perl_Vars.'); + print EM multon($sym,'G','PL_Vars.'); } print EM <<'END'; @@ -286,4 +304,20 @@ print EM <<'END'; END +print EM <<'END'; + +#ifndef MIN_PERL_DEFINE + +END + +for $sym (sort @extvars) { + print EM hide($sym,"PL_$sym"); +} + +print EM <<'END'; + +#endif /* MIN_PERL_DEFINE */ +END + + close(EM);