develooper Front page | perl.perl5.porters | Postings from September 2011

Re: CPAN smoke for magicflags1 done

Thread Previous | Thread Next
From:
Chip Salzenberg
Date:
September 19, 2011 09:52
Subject:
Re: CPAN smoke for magicflags1 done
Message ID:
CANSL5VHK065xgkBjX75M=jBJknojrZme5=WfvXOo24OrSs7ybw@mail.gmail.com
And the first concrete patch comes out of the smoke.
This fixes lvalue pos() on an SV with get magic, making Variable::Magic
happy again:

diff --git mg.c mg.c
index 42c6edb..521cbba 100644
--- mg.c
+++ mg.c
@@ -2176,7 +2176,7 @@ Perl_magic_setpos(pTHX_ SV *sv, MAGIC *mg)
        found->mg_len = -1;
        return 0;
     }
-    len = SvPOK(lsv) ? SvCUR(lsv) : sv_len(lsv);
+    len = SvPOK_nog(lsv) ? SvCUR(lsv) : sv_len(lsv);

     pos = SvIV(sv) - CopARYBASE_get(PL_curcop);

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About