Change 20549 by [EMAIL PROTECTED] on 2003/08/07 15:07:48

        Integrate:
        [ 20538]
        Subject: Re: [perl #23030] Error in negative lookahead with alternations
        From: [EMAIL PROTECTED]
        Date: Thu, 07 Aug 2003 02:44:23 +0100
        Message-Id: <[EMAIL PROTECTED]>
        
        [ 20540]
        Subject: Re: maint @ 20537
        From: Philip Newton <[EMAIL PROTECTED]>
        Date: Thu, 07 Aug 2003 09:05:17 +0200
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 20541]
        Subject: Re: maint @ 20537
        From: Philip Newton <[EMAIL PROTECTED]>
        Date: Thu, 07 Aug 2003 09:05:17 +0200
        Message-ID: <[EMAIL PROTECTED]>
        
        [ 20542]
        If no alarm(), skip the subtests.
        
        [ 20546]
        Subject: [PATCH 5.8.1] Benchmark problem
        From: Radu Greab <[EMAIL PROTECTED]>
        Date: Thu, 07 Aug 2003 16:18:25 +0300 (EEST)
        Message-Id: <[EMAIL PROTECTED]>
        
        Subject: Re: [PATCH 5.8.1] Benchmark problem
        From: Rafael Garcia-Suarez <[EMAIL PROTECTED]>
        Date: Thu, 7 Aug 2003 15:48:38 +0200
        Message-Id: <[EMAIL PROTECTED]>
        
        [ 20548]
        Subject: [PATCH] Test::More
        From: Fergal Daly <[EMAIL PROTECTED]>
        Date: Thu, 7 Aug 2003 15:52:11 +0100
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.8/perl/ext/Socket/Socket.xs#5 integrate
... //depot/maint-5.8/perl/ext/Time/HiRes/t/HiRes.t#2 integrate
... //depot/maint-5.8/perl/hints/dos_djgpp.sh#3 integrate
... //depot/maint-5.8/perl/lib/Benchmark.pm#4 integrate
... //depot/maint-5.8/perl/lib/Benchmark.t#6 integrate
... //depot/maint-5.8/perl/lib/Test/More.pm#4 integrate
... //depot/maint-5.8/perl/regexec.c#23 integrate
... //depot/maint-5.8/perl/t/op/re_tests#4 integrate

Differences ...

==== //depot/maint-5.8/perl/ext/Socket/Socket.xs#5 (text) ====
Index: perl/ext/Socket/Socket.xs
--- perl/ext/Socket/Socket.xs#4~19576~  Tue May 20 13:05:45 2003
+++ perl/ext/Socket/Socket.xs   Thu Aug  7 08:07:48 2003
@@ -371,10 +371,10 @@
                        addr.sun_family,
                        AF_UNIX);
        }
-       e = addr.sun_path;
-       while (*e && e < addr.sun_path + sizeof addr.sun_path)
+       e = (char*)addr.sun_path;
+       while (*e && e < (char*)addr.sun_path + sizeof addr.sun_path)
            ++e;
-       ST(0) = sv_2mortal(newSVpvn(addr.sun_path, e - addr.sun_path));
+       ST(0) = sv_2mortal(newSVpvn(addr.sun_path, e - (char*)addr.sun_path));
 #else
        ST(0) = (SV *) not_here("unpack_sockaddr_un");
 #endif

==== //depot/maint-5.8/perl/ext/Time/HiRes/t/HiRes.t#2 (text) ====
Index: perl/ext/Time/HiRes/t/HiRes.t
--- perl/ext/Time/HiRes/t/HiRes.t#1~20271~      Mon Jul 28 08:18:57 2003
+++ perl/ext/Time/HiRes/t/HiRes.t       Thu Aug  7 08:07:48 2003
@@ -131,7 +131,7 @@
     ok 11, $f > 0.4 && $f < 0.9, "slept $f instead of 0.5 secs.";
 }
 
-if (!$have_ualarm) {
+if (!$have_ualarm || !$Config{d_alarm}) {
     skip 12..13;
 }
 else {

==== //depot/maint-5.8/perl/lib/Benchmark.pm#4 (text) ====
Index: perl/lib/Benchmark.pm
--- perl/lib/Benchmark.pm#3~20468~      Sun Aug  3 22:16:18 2003
+++ perl/lib/Benchmark.pm       Thu Aug  7 08:07:48 2003
@@ -440,7 +440,7 @@
 
 sub mytime () { time }
 
-&init;
+init();
 
 sub BEGIN {
     if (eval 'require Time::HiRes') {
@@ -470,8 +470,8 @@
     # The cache can cause a slight loss of sys time accuracy. If a
     # user does many tests (>10) with *very* large counts (>10000)
     # or works on a very slow machine the cache may be useful.
-    &disablecache;
-    &clearallcache;
+    disablecache();
+    clearallcache();
 }
 
 sub debug { $Debug = ($_[1] != 0); }
@@ -482,43 +482,22 @@
     return $_Usage{$calling_sub} || '';
 }
 
-
 # The cache needs two branches: 's' for strings and 'c' for code.  The
-# emtpy loop is different in these two cases.
-
-$_Usage{clearcache} = <<'USAGE';
-usage: clearcache($count);
-USAGE
+# empty loop is different in these two cases.
 
-sub clearcache    { 
-    die usage unless @_ == 1;
+sub clearcache ($) {
     delete $Cache{"$_[0]c"}; delete $Cache{"$_[0]s"}; 
 }
 
-$_Usage{clearallcache} = <<'USAGE';
-usage: clearallcache();
-USAGE
-
-sub clearallcache { 
-    die usage if @_;
+sub clearallcache () { 
     %Cache = (); 
 }
 
-$_Usage{enablecache} = <<'USAGE';
-usage: enablecache();
-USAGE
-
-sub enablecache   {
-    die usage if @_;
+sub enablecache () {
     $Do_Cache = 1; 
 }
 
-$_Usage{disablecache} = <<'USAGE';
-usage: disablecache();
-USAGE
-
-sub disablecache  {
-    die usage if @_;
+sub disablecache  () {
     $Do_Cache = 0; 
 }
 

==== //depot/maint-5.8/perl/lib/Benchmark.t#6 (text) ====
Index: perl/lib/Benchmark.t
--- perl/lib/Benchmark.t#5~20468~       Sun Aug  3 22:16:18 2003
+++ perl/lib/Benchmark.t        Thu Aug  7 08:07:48 2003
@@ -583,7 +583,7 @@
 
     foreach my $func (@takes_no_args) {
         eval "$func(42)";
-        is( $@, $usage{$func}, "$func usage: with args" );
+        like( $@, qr/Too many arguments for Benchmark::$func/, "$func usage: with 
args" );
     }
 }
 

==== //depot/maint-5.8/perl/lib/Test/More.pm#4 (text) ====
Index: perl/lib/Test/More.pm
--- perl/lib/Test/More.pm#3~20468~      Sun Aug  3 22:16:18 2003
+++ perl/lib/Test/More.pm       Thu Aug  7 08:07:48 2003
@@ -25,7 +25,7 @@
              cmp_ok
              skip todo todo_skip
              pass fail
-             eq_array eq_hash eq_set eq_deeply
+             eq_array eq_hash eq_set
              $TODO
              plan
              can_ok  isa_ok

==== //depot/maint-5.8/perl/regexec.c#23 (text) ====
Index: perl/regexec.c
--- perl/regexec.c#22~20442~    Fri Aug  1 22:43:01 2003
+++ perl/regexec.c      Thu Aug  7 08:07:48 2003
@@ -87,6 +87,7 @@
 #define RF_warned      2               /* warned about big count? */
 #define RF_evaled      4               /* Did an EVAL with setting? */
 #define RF_utf8                8               /* String contains multibyte chars? */
+#define RF_false       16              /* odd number of nested negatives */
 
 #define UTF ((PL_reg_flags & RF_utf8) != 0)
 
@@ -3190,7 +3191,10 @@
                                      "%*s  already tried at this position...\n",
                                      REPORT_CODE_OFF+PL_regindent*2, "")
                        );
-                       sayNO_SILENT;
+                       if (PL_reg_flags & RF_false)
+                           sayYES;
+                       else
+                           sayNO_SILENT;
                    }
                    PL_reg_poscache[o] |= (1<<b);
                }
@@ -3840,6 +3844,7 @@
            }
            else
                PL_reginput = locinput;
+           PL_reg_flags ^= RF_false;
            goto do_ifmatch;
        case IFMATCH:
            n = 1;
@@ -3855,6 +3860,8 @@
          do_ifmatch:
            inner = NEXTOPER(NEXTOPER(scan));
            if (regmatch(inner) != n) {
+               if (n == 0)
+                   PL_reg_flags ^= RF_false;
              say_no:
                if (logical) {
                    logical = 0;
@@ -3864,6 +3871,8 @@
                else
                    sayNO;
            }
+           if (n == 0)
+               PL_reg_flags ^= RF_false;
          say_yes:
            if (logical) {
                logical = 0;

==== //depot/maint-5.8/perl/t/op/re_tests#4 (text) ====
Index: perl/t/op/re_tests
--- perl/t/op/re_tests#3~20397~ Thu Jul 31 13:41:00 2003
+++ perl/t/op/re_tests  Thu Aug  7 08:07:48 2003
@@ -940,3 +940,4 @@
 ^(?:f|o|b){2,3}?(.+?)\1\z      foobarbar       y       $1      bar
 ^.{2,3}?((?:b|a|r)+?)\1\z      foobarbar       y       $1      bar
 ^(?:f|o|b){2,3}?((?:b|a|r)+?)\1\z      foobarbar       y       $1      bar
+.*a(?!(b|cd)*e).*f     ......abef      n       -       -       # [perl #23030]
End of Patch.

Reply via email to