This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_hot.c:pp_subst: Move comment
authorFather Chrysostomos <sprout@cpan.org>
Thu, 22 Aug 2013 05:03:49 +0000 (22:03 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 22 Aug 2013 05:15:37 +0000 (22:15 -0700)
Perl 5 has always had the ‘don't match same null twice’ comment
in pp_subst.  Originally it was a parenthetical note right below
the s == m.

71be2cbc removed the parentheses.  Commit f722798be moved it further
away from s == m.  Now what it refers to is far from clear.

pp_hot.c

index 82b2508..50a2de9 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2232,9 +2232,9 @@ PP(pp_subst)
                    d += clen;
                }
                s = RX_OFFS(rx)[0].end + orig;
-           } while (CALLREGEXEC(rx, s, strend, orig, s == m,
+           } while (CALLREGEXEC(rx, s, strend, orig,
+                                s == m, /* don't match same null twice */
                                 TARG, NULL,
-                                /* don't match same null twice */
                      REXEC_NOT_FIRST|REXEC_IGNOREPOS|REXEC_FAIL_ON_UNDERFLOW));
            if (s != d) {
                 I32 i = strend - s;