Change 32745 by [EMAIL PROTECTED] on 2007/12/27 20:33:55
Test that we can clone regexps into new threads, and fix the bug in
change 32740 that this reveals. (Bug spotted by, and initial patch
from, Jerry D. Hedden.)
Affected files ...
... //depot/perl/sv.c#1456 edit
... //depot/perl/t/op/threads.t#15 edit
Differences ...
==== //depot/perl/sv.c#1456 (text) ====
Index: perl/sv.c
--- perl/sv.c#1455~32743~ 2007-12-27 10:43:40.000000000 -0800
+++ perl/sv.c 2007-12-27 12:33:55.000000000 -0800
@@ -10121,6 +10121,7 @@
case SVt_PVAV:
case SVt_PVCV:
case SVt_PVLV:
+ case SVt_ORANGE:
case SVt_PVMG:
case SVt_PVNV:
case SVt_PVIV:
@@ -10175,6 +10176,8 @@
break;
case SVt_PVMG:
break;
+ case SVt_ORANGE:
+ break;
case SVt_PVLV:
/* XXX LvTARGOFF sometimes holds PMOP* when DEBUGGING */
if (LvTYPE(dstr) == 't') /* for tie: unrefcnted fake (SV**) */
==== //depot/perl/t/op/threads.t#15 (text) ====
Index: perl/t/op/threads.t
--- perl/t/op/threads.t#14~32099~ 2007-10-11 06:14:21.000000000 -0700
+++ perl/t/op/threads.t 2007-12-27 12:33:55.000000000 -0800
@@ -16,7 +16,7 @@
exit 0;
}
- plan(10);
+ plan(12);
}
use strict;
@@ -159,4 +159,14 @@
ok(1, '[perl #45053]');
}
+sub matchit {
+ is (ref $_[1], "Regexp");
+ like ($_[0], $_[1]);
+}
+
+threads->new(\&matchit, "Pie", qr/pie/i)->join();
+
+# tests in threads don't get counted, so
+curr_test(curr_test() + 2);
+
# EOF
End of Patch.