summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2004-01-15 06:10:37 -0800
committerDave Mitchell <davem@fdisolutions.com>2004-01-16 19:24:14 +0000
commit891f9566d7fc0fb068ade9d98aed69773e02d39c (patch)
tree76e1dc8cf2b8b754bbb271ca11f01314964798b8 /doop.c
parent0bd0581c0da439d1bc9686c40ce8eabbab0f37cd (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/doop.c b/doop.c
index 6724aca814..47d64cb9f2 100644
--- a/doop.c
+++ b/doop.c
@@ -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);