Change 33831 by [EMAIL PROTECTED] on 2008/05/15 13:48:38

        Subject: Re: [PATCH] Double magic with chop
        From: "Vincent Pit" <[EMAIL PROTECTED]>
        Date: Thu, 15 May 2008 15:31:19 +0200 (CEST)
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/doop.c#201 edit
... //depot/perl/t/op/gmagic.t#2 edit

Differences ...

==== //depot/perl/doop.c#201 (text) ====
Index: perl/doop.c
--- perl/doop.c#200~33457~      2008-03-10 04:07:11.000000000 -0700
+++ perl/doop.c 2008-05-15 06:48:38.000000000 -0700
@@ -1033,7 +1033,7 @@
 
     s = SvPV(sv, len);
     if (len && !SvPOK(sv))
-       s = SvPV_force(sv, len);
+       s = SvPV_force_nomg(sv, len);
     if (DO_UTF8(sv)) {
        if (s && len) {
            char * const send = s + len;

==== //depot/perl/t/op/gmagic.t#2 (text) ====
Index: perl/t/op/gmagic.t
--- perl/t/op/gmagic.t#1~10223~ 2001-05-26 15:31:46.000000000 -0700
+++ perl/t/op/gmagic.t  2008-05-15 06:48:38.000000000 -0700
@@ -6,7 +6,7 @@
     @INC = '../lib';
 }
 
-print "1..18\n";
+print "1..20\n";
 
 my $t = 1;
 tie my $c => 'Tie::Monitor';
@@ -50,6 +50,10 @@
 $s = $c = $c . $c;
 ok_string($s, '00', 3, 1);
 
+# multiple magic in core functions
+$s = chop($c);
+ok_string($s, '0', 1, 1);
+
 # adapted from Tie::Counter by Abigail
 package Tie::Monitor;
 
End of Patch.

Reply via email to