Change 32699 by [EMAIL PROTECTED] on 2007/12/22 11:28:02

        Integrate:
        [ 32483]
        Use a new (clean) anonymous hash for each loop, rather than a hash in
        the pad, as the latter can change internal state sufficiently to
        confuse matters (even though in all cases it has no keys and from
        Perl space is "measurably" identical).
        
        [ 32500]
        Get APItest.xs compiling on 5.8.x by making the compilation of the
        Perl_hv_common() test code conditional on the macro hv_common being
        defined, and the refcounted_he code conditional on it being 5.9 or
        later.
        
        [ 32501]
        Hack round the fact that UNITCHECK is nothing special on 5.8.x by
        conditionally creating a sub UNITCHECK(&);
        
        [ 32502]
        UNITCHECK isn't anything special in 5.8.x, so don't run those tests.
        
        [ 32503]
        Skip the op.t API test as it's not relevant to 5.8.x (%^H propagation).
        Correct the expectations of hash.t and svsetsv.t for 5.8.x.
        
        [ 32507]
        Test both dMY_CXT and dMY_CXT_INTERP.

Affected files ...

... //depot/perl/ext/XS/APItest/APItest.pm#20 integrate
... //depot/perl/ext/XS/APItest/APItest.xs#43 integrate
... //depot/perl/ext/XS/APItest/t/hash.t#17 integrate
... //depot/perl/ext/XS/APItest/t/my_cxt.t#3 integrate
... //depot/perl/ext/XS/APItest/t/op.t#2 integrate
... //depot/perl/ext/XS/APItest/t/svsetsv.t#2 integrate
... //depot/perl/ext/XS/APItest/t/xs_special_subs.t#4 integrate
... //depot/perl/ext/XS/APItest/t/xs_special_subs_require.t#2 integrate
... //depot/perl/perl.h#807 integrate

Differences ...

==== //depot/perl/ext/XS/APItest/APItest.pm#20 (text) ====
Index: perl/ext/XS/APItest/APItest.pm
--- perl/ext/XS/APItest/APItest.pm#19~30459~    2007-03-04 03:51:08.000000000 
-0800
+++ perl/ext/XS/APItest/APItest.pm      2007-12-22 03:28:02.000000000 -0800
@@ -40,6 +40,14 @@
 use vars '$WARNINGS_ON_BOOTSTRAP';
 use vars map "\$${_}_called_PP", qw(BEGIN UNITCHECK CHECK INIT END);
 
+BEGIN {
+    # This is arguably a hack, but it disposes of the UNITCHECK block without
+    # needing to preprocess the source code
+    if ($] < 5.009) {
+       eval 'sub UNITCHECK (&) {}; 1' or die $@;
+    }
+}
+
 # Do these here to verify that XS code and Perl code get called at the same
 # times
 BEGIN {
@@ -47,7 +55,7 @@
 }
 UNITCHECK {
     $UNITCHECK_called_PP++;
-}
+};
 {
     # Need $W false by default, as some tests run under -w, and under -w we
     # can get warnings about "Too late to run CHECK" block (and INIT block)

==== //depot/perl/ext/XS/APItest/APItest.xs#43 (text) ====
Index: perl/ext/XS/APItest/APItest.xs
--- perl/ext/XS/APItest/APItest.xs#42~31929~    2007-09-20 07:00:07.000000000 
-0700
+++ perl/ext/XS/APItest/APItest.xs      2007-12-22 03:28:02.000000000 -0800
@@ -30,14 +30,17 @@
 }
 
 SV*
-my_cxt_getsv_interp(void)
+my_cxt_getsv_interp_context(void)
 {
-#ifdef PERL_IMPLICIT_CONTEXT
     dTHX;
     dMY_CXT_INTERP(my_perl);
-#else
+    return MY_CXT.sv;
+}
+
+SV*
+my_cxt_getsv_interp(void)
+{
     dMY_CXT;
-#endif
     return MY_CXT.sv;
 }
 
@@ -404,6 +407,8 @@
         OUTPUT:
         RETVAL
 
+#if defined (hv_common)
+
 SV *
 common(params)
        INPUT:
@@ -449,6 +454,8 @@
         OUTPUT:
         RETVAL
 
+#endif
+
 void
 test_hv_free_ent()
        PPCODE:
@@ -479,6 +486,8 @@
        OUTPUT:
        RETVAL
 
+#if PERL_VERSION >= 9
+
 bool
 refcounted_he_exists(key, level=0)
        SV *key
@@ -493,7 +502,6 @@
        OUTPUT:
        RETVAL
 
-
 SV *
 refcounted_he_fetch(key, level=0)
        SV *key
@@ -508,6 +516,7 @@
        OUTPUT:
        RETVAL
        
+#endif
        
 =pod
 
@@ -781,10 +790,11 @@
        my_cxt_setint_p(aMY_CXT_ i);
 
 void
-my_cxt_getsv()
+my_cxt_getsv(how)
+    bool how;
     PPCODE:
        EXTEND(SP, 1);
-       ST(0) = my_cxt_getsv_interp();
+       ST(0) = how ? my_cxt_getsv_interp_context() : my_cxt_getsv_interp();
        XSRETURN(1);
 
 void

==== //depot/perl/ext/XS/APItest/t/hash.t#17 (text) ====
Index: perl/ext/XS/APItest/t/hash.t
--- perl/ext/XS/APItest/t/hash.t#16~31923~      2007-09-20 03:21:30.000000000 
-0700
+++ perl/ext/XS/APItest/t/hash.t        2007-12-22 03:28:02.000000000 -0800
@@ -49,13 +49,16 @@
 {
   my %h = (a=>'cheat');
   tie %h, 'Tie::StdHash';
-  is (XS::APItest::Hash::store(\%h, chr 258,  1), undef);
+  # is bug 36327 fixed?
+  my $result = ($] > 5.009) ? undef : 1;
+
+  is (XS::APItest::Hash::store(\%h, chr 258,  1), $result);
     
   ok (!exists $h{$utf8_for_258},
       "hv_store doesn't insert a key with the raw utf8 on a tied hash");
 }
 
-{
+if ($] > 5.009) {
     my $strtab = strtab();
     is (ref $strtab, 'HASH', "The shared string table quacks like a hash");
     my $wibble = "\0";
@@ -382,19 +385,28 @@
 
   my $class = tied %$hash;
 
-  my %h1 = @$defaults;
-  my %h2 = @$defaults;
+  # It's important to do this with nice new hashes created each time round
+  # the loop, rather than hashes in the pad, which get recycled, and may have
+  # xhv_array non-NULL
+  my $h1 = [EMAIL PROTECTED];
+  my $h2 = [EMAIL PROTECTED];
   if (defined $class) {
-    tie %h1, ref $class;
-    tie %h2, ref $class;
-    $HV_STORE_IS_CRAZY = undef;
+    tie %$h1, ref $class;
+    tie %$h2, ref $class;
+    if ($] > 5.009) {
+      # bug 36327 is fixed
+      $HV_STORE_IS_CRAZY = undef;
+    } else {
+      # HV store_ent returns 1 if there was already underlying hash storage
+      $HV_STORE_IS_CRAZY = undef unless @$defaults;
+    }
   }
-  is (XS::APItest::Hash::store_ent(\%h1, $key, 1), $HV_STORE_IS_CRAZY,
-      "hv_store_ent$message $printable"); 
-  ok (brute_force_exists (\%h1, $key), "hv_store_ent$message $printable");
-  is (XS::APItest::Hash::store(\%h2, $key,  1), $HV_STORE_IS_CRAZY,
+  is (XS::APItest::Hash::store_ent($h1, $key, 1), $HV_STORE_IS_CRAZY,
+      "hv_store_ent$message $printable");
+  ok (brute_force_exists ($h1, $key), "hv_store_ent$message $printable");
+  is (XS::APItest::Hash::store($h2, $key,  1), $HV_STORE_IS_CRAZY,
       "hv_store$message $printable");
-  ok (brute_force_exists (\%h2, $key), "hv_store$message $printable");
+  ok (brute_force_exists ($h2, $key), "hv_store$message $printable");
 }
 
 sub test_fetch_present {

==== //depot/perl/ext/XS/APItest/t/my_cxt.t#3 (text) ====
Index: perl/ext/XS/APItest/t/my_cxt.t
--- perl/ext/XS/APItest/t/my_cxt.t#2~30310~     2007-02-15 01:34:01.000000000 
-0800
+++ perl/ext/XS/APItest/t/my_cxt.t      2007-12-22 03:28:02.000000000 -0800
@@ -23,35 +23,40 @@
 use warnings;
 use strict;
 
-use Test::More tests => 11;
+use Test::More tests => 16;
 
 BEGIN {
     use_ok('XS::APItest');
 };
 
 is(my_cxt_getint(), 99, "initial int value");
-is(my_cxt_getsv(),  "initial", "initial SV value");
+is(my_cxt_getsv($_),  "initial", "initial SV value$_")
+    foreach '', ' (context arg)';
 
 my_cxt_setint(1234);
 is(my_cxt_getint(), 1234, "new int value");
 
 my_cxt_setsv("abcd");
-is(my_cxt_getsv(),  "abcd", "new SV value");
+is(my_cxt_getsv($_),  "abcd", "new SV value$_")
+    foreach '', ' (context arg)';
 
 sub do_thread {
     is(my_cxt_getint(), 1234, "initial int value (child)");
     my_cxt_setint(4321);
     is(my_cxt_getint(), 4321, "new int value (child)");
 
-    is(my_cxt_getsv(), "initial_clone", "initial sv value (child)");
+    is(my_cxt_getsv($_), "initial_clone", "initial sv value (child)$_")
+           foreach '', ' (context arg)';
     my_cxt_setsv("dcba");
-    is(my_cxt_getsv(),  "dcba", "new SV value (child)");
+    is(my_cxt_getsv($_),  "dcba", "new SV value (child)$_")
+           foreach '', ' (context arg)';
 }
 
 SKIP: {
-    skip "No threads", 4 unless $threads;
+    skip "No threads", 6 unless $threads;
     threads->create(\&do_thread)->join;
 }
 
 is(my_cxt_getint(), 1234,  "int value preserved after join");
-is(my_cxt_getsv(),  "abcd", "SV value preserved after join");
+is(my_cxt_getsv($_),  "abcd", "SV value preserved after join$_")
+        foreach '', ' (context arg)';

==== //depot/perl/ext/XS/APItest/t/op.t#2 (text) ====
Index: perl/ext/XS/APItest/t/op.t
--- perl/ext/XS/APItest/t/op.t#1~28335~ 2006-05-29 15:58:46.000000000 -0700
+++ perl/ext/XS/APItest/t/op.t  2007-12-22 03:28:02.000000000 -0800
@@ -11,6 +11,10 @@
     print "1..0 # Skip: XS::APItest was not built\n";
     exit 0;
   }
+  if ($] < 5.009) {
+    print "1..0 # Skip: hints hash not present before 5.10.0\n";
+    exit 0;
+  }
 }
 
 use strict;

==== //depot/perl/ext/XS/APItest/t/svsetsv.t#2 (text) ====
Index: perl/ext/XS/APItest/t/svsetsv.t
--- perl/ext/XS/APItest/t/svsetsv.t#1~29249~    2006-11-12 13:57:22.000000000 
-0800
+++ perl/ext/XS/APItest/t/svsetsv.t     2007-12-22 03:28:02.000000000 -0800
@@ -18,8 +18,13 @@
 
 # I can't see a good way to easily get back perl-space diagnostics for these
 # I hope that this isn't a problem.
-ok(sv_setsv_cow_hashkey_core,
-   "With PERL_CORE sv_setsv does COW for shared hash key scalars");
+if ($] > 5.009) {
+  ok(sv_setsv_cow_hashkey_core,
+     "With PERL_CORE sv_setsv does COW for shared hash key scalars");
+} else {
+  ok(!sv_setsv_cow_hashkey_core,
+     "With PERL_CORE on 5.8.x sv_setsv doesn't COW for shared hash key 
scalars");
+}
 
 ok(!sv_setsv_cow_hashkey_notcore,
    "Without PERL_CORE sv_setsv doesn't COW for shared hash key scalars");

==== //depot/perl/ext/XS/APItest/t/xs_special_subs.t#4 (text) ====
Index: perl/ext/XS/APItest/t/xs_special_subs.t
--- perl/ext/XS/APItest/t/xs_special_subs.t#3~30076~    2007-01-29 
15:36:02.000000000 -0800
+++ perl/ext/XS/APItest/t/xs_special_subs.t     2007-12-22 03:28:02.000000000 
-0800
@@ -16,7 +16,11 @@
 
 use strict;
 use warnings;
-use Test::More tests => 100;
+my $uc;
+BEGIN {
+    $uc = $] > 5.009;
+}
+use Test::More tests => $uc ? 100 : 80;
 
 # Doing this longhand cut&paste makes it clear
 # BEGIN and INIT are FIFO, CHECK and END are LIFO
@@ -24,8 +28,10 @@
     print "# First BEGIN\n";
     is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
     is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called");
+    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+       if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called")
+       if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not yet called");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not yet called");
     is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -38,8 +44,8 @@
     print "# First CHECK\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, 1, "CHECK called");
     is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
     is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -52,8 +58,8 @@
     print "# First INIT\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, 1, "CHECK called");
     is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
     is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -66,8 +72,8 @@
     print "# First END\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, 1, "CHECK called");
     is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
     is($XS::APItest::INIT_called, 1, "INIT called");
@@ -79,8 +85,8 @@
 print "# First body\n";
 is($XS::APItest::BEGIN_called, 1, "BEGIN called");
 is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
 is($XS::APItest::CHECK_called, 1, "CHECK called");
 is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
 is($XS::APItest::INIT_called, 1, "INIT called");
@@ -93,8 +99,8 @@
 print "# Second body\n";
 is($XS::APItest::BEGIN_called, 1, "BEGIN called");
 is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
 is($XS::APItest::CHECK_called, 1, "CHECK called");
 is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
 is($XS::APItest::INIT_called, 1, "INIT called");
@@ -106,8 +112,8 @@
     print "# Second BEGIN\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not yet called");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not yet called");
     is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -120,8 +126,8 @@
     print "# Second CHECK\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK yet called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK yet called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK yet called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK yet called") if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not yet called");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not yet called");
     is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -134,8 +140,8 @@
     print "# Second INIT\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, 1, "CHECK called");
     is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
     is($XS::APItest::INIT_called, 1, "INIT called");
@@ -148,8 +154,8 @@
     print "# Second END\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, 1, "CHECK called");
     is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
     is($XS::APItest::INIT_called, 1, "INIT called");

==== //depot/perl/ext/XS/APItest/t/xs_special_subs_require.t#2 (text) ====
Index: perl/ext/XS/APItest/t/xs_special_subs_require.t
--- perl/ext/XS/APItest/t/xs_special_subs_require.t#1~30076~    2007-01-29 
15:36:02.000000000 -0800
+++ perl/ext/XS/APItest/t/xs_special_subs_require.t     2007-12-22 
03:28:02.000000000 -0800
@@ -15,7 +15,11 @@
 
 use strict;
 use warnings;
-use Test::More tests => 103;
+my $uc;
+BEGIN {
+    $uc = $] > 5.009;
+}
+use Test::More tests => $uc ? 103 : 83;
 
 # Doing this longhand cut&paste makes it clear
 # BEGIN and INIT are FIFO, CHECK and END are LIFO
@@ -23,8 +27,10 @@
     print "# First BEGIN\n";
     is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
     is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called");
+    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+       if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called")
+       if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called");
     is($XS::APItest::INIT_called, undef, "INIT not called");
@@ -37,8 +43,10 @@
     print "# First CHECK\n";
     is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
     is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called");
+    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+       if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called")
+       if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called (too late)");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called (too late)");
     is($XS::APItest::INIT_called, undef, "INIT not called");
@@ -51,8 +59,10 @@
     print "# First INIT\n";
     is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
     is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called");
+    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+       if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called")
+       if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called (too late)");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called (too late)");
     is($XS::APItest::INIT_called, undef, "INIT not called");
@@ -65,8 +75,8 @@
     print "# First END\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called (too late)");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called (too late)");
     is($XS::APItest::INIT_called, undef, "INIT not called (too late)");
@@ -78,8 +88,8 @@
 print "# First body\n";
 is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
 is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called");
+is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called") if $uc;
+is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called") if $uc;
 is($XS::APItest::CHECK_called, undef, "CHECK not called (too late)");
 is($XS::APItest::CHECK_called_PP, undef, "CHECK not called (too late)");
 is($XS::APItest::INIT_called, undef, "INIT not called (too late)");
@@ -101,8 +111,8 @@
 print "# Second body\n";
 is($XS::APItest::BEGIN_called, 1, "BEGIN called");
 is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
 is($XS::APItest::CHECK_called, undef, "CHECK not called (too late)");
 is($XS::APItest::CHECK_called_PP, undef, "CHECK not called (too late)");
 is($XS::APItest::INIT_called, undef, "INIT not called (too late)");
@@ -114,8 +124,10 @@
     print "# Second BEGIN\n";
     is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
     is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called");
+    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+       if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not called")
+       if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called");
     is($XS::APItest::INIT_called, undef, "INIT not called");
@@ -128,8 +140,10 @@
     print "# Second CHECK\n";
     is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
     is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called");
+    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+       if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called")
+       if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called");
     is($XS::APItest::INIT_called, undef, "INIT not called");
@@ -142,8 +156,10 @@
     print "# Second INIT\n";
     is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
     is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
-    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
-    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called");
+    is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+       if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called")
+       if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called (too late)");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called (too late)");
     is($XS::APItest::INIT_called, undef, "INIT not called (too late)");
@@ -156,8 +172,8 @@
     print "# Second END\n";
     is($XS::APItest::BEGIN_called, 1, "BEGIN called");
     is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+    is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+    is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
     is($XS::APItest::CHECK_called, undef, "CHECK not called (too late)");
     is($XS::APItest::CHECK_called_PP, undef, "CHECK not called (too late)");
     is($XS::APItest::INIT_called, undef, "INIT not called (too late)");

==== //depot/perl/perl.h#807 (text) ====
Index: perl/perl.h
--- perl/perl.h#806~32681~      2007-12-20 13:52:06.000000000 -0800
+++ perl/perl.h 2007-12-22 03:28:02.000000000 -0800
@@ -5561,6 +5561,7 @@
 #define START_MY_CXT   static my_cxt_t my_cxt;
 #define dMY_CXT_SV     dNOOP
 #define dMY_CXT                dNOOP
+#define dMY_CXT_INTERP(my_perl)        dNOOP
 #define MY_CXT_INIT    NOOP
 #define MY_CXT_CLONE   NOOP
 #define MY_CXT         my_cxt
End of Patch.

Reply via email to