diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2004-01-15 06:10:37 -0800 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-01-16 19:24:14 +0000 |
commit | 891f9566d7fc0fb068ade9d98aed69773e02d39c (patch) | |
tree | 76e1dc8cf2b8b754bbb271ca11f01314964798b8 /doop.c | |
parent | 0bd0581c0da439d1bc9686c40ce8eabbab0f37cd (diff) | |
download | perl-891f9566d7fc0fb068ade9d98aed69773e02d39c.tar.gz |
Re: [perl #24816] Magic vars seem unsure if they are purely numeric
Message-Id: <20040115221037.GA2392@efn.org>
Add sv_2iv_flags() to allow magic to be optionally processed.
p4raw-id: //depot/perl@22163
Diffstat (limited to 'doop.c')
-rw-r--r-- | doop.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1135,8 +1135,8 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) if (sv != left || (optype != OP_BIT_AND && !SvOK(sv) && !SvGMAGICAL(sv))) sv_setpvn(sv, "", 0); /* avoid undef warning on |= and ^= */ - lsave = lc = SvPV(left, leftlen); - rsave = rc = SvPV(right, rightlen); + lsave = lc = SvPV_nomg(left, leftlen); + rsave = rc = SvPV_nomg(right, rightlen); len = leftlen < rightlen ? leftlen : rightlen; lensave = len; if ((left_utf || right_utf) && (sv == left || sv == right)) { @@ -1145,7 +1145,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) } else if (SvOK(sv) || SvTYPE(sv) > SVt_PVMG) { STRLEN n_a; - dc = SvPV_force(sv, n_a); + dc = SvPV_force_nomg(sv, n_a); if (SvCUR(sv) < (STRLEN)len) { dc = SvGROW(sv, (STRLEN)(len + 1)); (void)memzero(dc + SvCUR(sv), len - SvCUR(sv) + 1); |