From 13c5b33cae5690f108494286e4d841e38c57677d Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 8 Jun 2005 14:52:17 +0000 Subject: Allow a null length pointer to sv_pvn_force_flags. Add SvPV_force_nolen and use it to remove some Cs p4raw-id: //depot/perl@24759 --- pp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pp.c') 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"); -- cgit v1.2.1