In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/42bb57af5d09a3173afb22e2786779eabfed2223?hp=f703fc96a75eab3db924e41a52531905784836de>

- Log -----------------------------------------------------------------
commit 42bb57af5d09a3173afb22e2786779eabfed2223
Merge: f703fc9 d1e2f60
Author: Tony Cook <[email protected]>
Date:   Fri Jan 25 13:54:47 2013 +1100

    fix -DPERL_GLOBAL_STRUCT_PRIVATE builds

commit d1e2f601ca8f928cc2b7526839763ea10c26b18f
Author: Tony Cook <[email protected]>
Date:   Tue Jan 22 22:38:10 2013 +1100

    PL_Vars and PL_VarsPtr aren't exported under PERL_GLOBAL_STRUCT_PRIVATE

M       makedef.pl

commit f0af002c737e9413e85d737a29c8c9b396c13414
Author: Tony Cook <[email protected]>
Date:   Tue Jan 22 22:37:34 2013 +1100

    release the global struct *after* we've finished using it

M       lib/ExtUtils/t/Embed.t
M       miniperlmain.c
-----------------------------------------------------------------------

Summary of changes:
 lib/ExtUtils/t/Embed.t |    8 ++++----
 makedef.pl             |    3 ++-
 miniperlmain.c         |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t
index 269b20a..7a83c98 100644
--- a/lib/ExtUtils/t/Embed.t
+++ b/lib/ExtUtils/t/Embed.t
@@ -204,13 +204,13 @@ int main(int argc, char **argv, char **env) {
 
     perl_free(my_perl);
 
-#ifdef PERL_GLOBAL_STRUCT
-    free_global_struct(plvarsp);
-#endif /* PERL_GLOBAL_STRUCT */
-
     my_puts("ok 8");
 
     PERL_SYS_TERM();
 
+#ifdef PERL_GLOBAL_STRUCT
+    free_global_struct(plvarsp);
+#endif /* PERL_GLOBAL_STRUCT */
+
     return 0;
 }
diff --git a/makedef.pl b/makedef.pl
index 0593342..4376842 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -530,7 +530,8 @@ if ($define{'PERL_GLOBAL_STRUCT'}) {
     # is mentioned in perlvar.h and globvar.sym, and always exported.
     delete $skip{PL_sh_path};
     ++$export{Perl_GetVars};
-    try_symbols(qw(PL_Vars PL_VarsPtr)) unless $ARGS{CCTYPE} eq 'GCC';
+    try_symbols(qw(PL_Vars PL_VarsPtr))
+      unless $ARGS{CCTYPE} eq 'GCC' || $define{PERL_GLOBAL_STRUCT_PRIVATE};
 } else {
     ++$skip{$_} foreach qw(Perl_init_global_struct Perl_free_global_struct);
 }
diff --git a/miniperlmain.c b/miniperlmain.c
index 7f63a34..61358f7 100644
--- a/miniperlmain.c
+++ b/miniperlmain.c
@@ -138,12 +138,12 @@ main(int argc, char **argv, char **env)
     environ = env;
 #endif
 
+    PERL_SYS_TERM();
+
 #ifdef PERL_GLOBAL_STRUCT
     free_global_struct(plvarsp);
 #endif /* PERL_GLOBAL_STRUCT */
 
-    PERL_SYS_TERM();
-
     exit(exitstatus);
     return exitstatus;
 }

--
Perl5 Master Repository

Reply via email to