This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_substr: combine two identical blocks of code
authorDavid Mitchell <davem@iabyn.com>
Fri, 4 Feb 2011 16:13:51 +0000 (16:13 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 6 Feb 2011 21:34:43 +0000 (21:34 +0000)
pp_hot.c

index 2241c31..c20fb05 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2226,15 +2226,8 @@ PP(pp_subst)
        && (!doutf8 || SvUTF8(TARG)))
     {
        if (!matched)
        && (!doutf8 || SvUTF8(TARG)))
     {
        if (!matched)
-       {
-           SPAGAIN;
-           if (rpm->op_pmflags & PMf_NONDESTRUCT)
-               PUSHs(TARG);
-           else
-               PUSHs(&PL_sv_no);
-           LEAVE_SCOPE(oldsave);
-           RETURN;
-       }
+           goto ret_no;
+
 #ifdef PERL_OLD_COPY_ON_WRITE
        if (SvIsCOW(TARG)) {
            assert (!force_on_match);
 #ifdef PERL_OLD_COPY_ON_WRITE
        if (SvIsCOW(TARG)) {
            assert (!force_on_match);