summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-02-06 19:42:28 +0000
committerDavid Mitchell <davem@iabyn.com>2011-02-06 21:34:43 +0000
commit33fb6f35374f797590a5f7df9532ead893676812 (patch)
tree2670d397d90b9ef9eb611825edd358f89a7e0bd0 /sv.c
parent572d598f754af334bea81530a84b95b5605fe3c4 (diff)
downloadperl-33fb6f35374f797590a5f7df9532ead893676812.tar.gz
Make Perl_sv_utf8_upgrade* respect nomg
One of the code paths in Perl_sv_utf8_upgrade_flags_grow() calls SvPV_force(), regardless of whether the SV_GMAGIC flag is set or not, which triggers an unconditional magic get.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 6e8e5f3e91..e7a216f773 100644
--- a/sv.c
+++ b/sv.c
@@ -3223,7 +3223,7 @@ Perl_sv_utf8_upgrade_flags_grow(pTHX_ register SV *const sv, const I32 flags, ST
return len;
}
} else {
- (void) SvPV_force(sv,len);
+ (void) SvPV_force_flags(sv,len,flags & SV_GMAGIC);
}
}