This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix building with PERL_GLOBAL_STRUCT defined.
authorNicholas Clark <nick@ccl4.org>
Tue, 17 Aug 2010 16:28:03 +0000 (17:28 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 17 Aug 2010 16:28:03 +0000 (17:28 +0100)
Presumably this compilation option was broken when Perl_clone_params_del
and Perl_clone_params_new were added in f7abe70be985cb91.

sv.c

diff --git a/sv.c b/sv.c
index 8ab73ac..4918449 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12861,9 +12861,11 @@ S_unreferenced_to_tmp_stack(pTHX_ AV *const unreferenced)
 void
 Perl_clone_params_del(CLONE_PARAMS *param)
 {
-    PerlInterpreter *const was = PERL_GET_THX;
+    /* This seemingly funky ordering keeps the build with PERL_GLOBAL_STRUCT
+       happy: */
     PerlInterpreter *const to = param->new_perl;
     dTHXa(to);
+    PerlInterpreter *const was = PERL_GET_THX;
 
     PERL_ARGS_ASSERT_CLONE_PARAMS_DEL;
 
@@ -12885,6 +12887,7 @@ Perl_clone_params_del(CLONE_PARAMS *param)
 CLONE_PARAMS *
 Perl_clone_params_new(PerlInterpreter *const from, PerlInterpreter *const to)
 {
+    dVAR;
     /* Need to play this game, as newAV() can call safesysmalloc(), and that
        does a dTHX; to get the context from thread local storage.
        FIXME - under PERL_CORE Newx(), Safefree() and friends should expand to