diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-29 07:56:11 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-29 07:56:11 +0000 |
commit | 050e63623eb7a1ee5c40a7115cbe0e102b5b6b5a (patch) | |
tree | bb42d5ed7d46df4ec305a06071e2a4dca20d4c0a /pp.c | |
parent | fd061412c8b2788b74d7b7850b97a2b1bcb19bc0 (diff) | |
download | perl-050e63623eb7a1ee5c40a7115cbe0e102b5b6b5a.tar.gz |
Back out changes 30762 and 30763
p4raw-id: //depot/perl@30776
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -3014,13 +3014,13 @@ PP(pp_substr) I32 pos; I32 rem; I32 fail; - const int num_args = PL_op->op_private & 7; - const I32 lvalue = num_args <= 3 && ( PL_op->op_flags & OPf_MOD || LVRET ); + const I32 lvalue = PL_op->op_flags & OPf_MOD || LVRET; const char *tmps; const I32 arybase = CopARYBASE_get(PL_curcop); SV *repl_sv = NULL; const char *repl = NULL; STRLEN repl_len; + const int num_args = PL_op->op_private & 7; bool repl_need_utf8_upgrade = FALSE; bool repl_is_utf8 = FALSE; @@ -3115,8 +3115,7 @@ PP(pp_substr) } } - if (GIMME_V != G_VOID && !lvalue) - sv_setpvn(TARG, tmps, rem); + sv_setpvn(TARG, tmps, rem); #ifdef USE_LOCALE_COLLATE sv_unmagic(TARG, PERL_MAGIC_collxfrm); #endif |