warn on C<my($foo,$foo)>
[p5sagit/p5-mst-13.2.git] / embed.pl
index f685f66..1d10c6c 100755 (executable)
--- 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 = ();
@@ -18,7 +37,6 @@ sub readsyms (\%$) {
 }
 
 readsyms %global, 'global.sym';
-readsyms %interp, 'interp.sym';
 
 sub readvars(\%$$) {
     my ($syms, $file,$pre) = @_;
@@ -61,12 +79,6 @@ foreach my $sym (sort keys %globvar)
    }
  }
 
-foreach my $sym (keys %interp)
- {
-  warn "extra $sym in interp.sym\n" 
-   unless exists $intrp{$sym} || exists $thread{$sym};
- }
-
 foreach my $sym (sort keys %thread)
  {
   warn "$sym in intrpvar.h\n" if exists $intrp{$sym};
@@ -285,4 +297,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);