summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-08 14:52:17 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-08 14:52:17 +0000
commit13c5b33cae5690f108494286e4d841e38c57677d (patch)
treea2047db7c9a986ca8c1e7b8e3f78506a7fa4a848 /pp.c
parent0510663fa1f5ec2b546d095c2c040e4f25909e8a (diff)
downloadperl-13c5b33cae5690f108494286e4d841e38c57677d.tar.gz
Allow a null length pointer to sv_pvn_force_flags.
Add SvPV_force_nolen and use it to remove some C<n_a>s p4raw-id: //depot/perl@24759
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 4feb59d8f7..0e528cdf07 100644
--- a/pp.c
+++ b/pp.c
@@ -3121,8 +3121,7 @@ PP(pp_substr)
else if (lvalue) { /* it's an lvalue! */
if (!SvGMAGICAL(sv)) {
if (SvROK(sv)) {
- STRLEN n_a;
- SvPV_force(sv,n_a);
+ SvPV_force_nolen(sv);
if (ckWARN(WARN_SUBSTR))
Perl_warner(aTHX_ packWARN(WARN_SUBSTR),
"Attempt to use reference as lvalue in substr");