regexec_flags(): simplify length calculation
authorDavid Mitchell <davem@iabyn.com>
Fri, 22 Jun 2012 15:26:08 +0000 (16:26 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 8 Sep 2012 14:42:06 +0000 (15:42 +0100)
commitac0ba89f3ee4e5469c43dc0a34b548a9aa415f98
tree3d6c45e1113b54ac143e26bb4d69bf36edc367d5
parentd3b97530399d61590a1500b52bdba553d657bda5
regexec_flags(): simplify length calculation

The code to calculate the length of the string to copy was

    PL_regeol - startpos + (stringarg - strbeg);

This is a hangover from the original (perl 3) regexp implementation
that under //i, copied and folded the original buffer: so startpos might
not equal stringarg. These days it always is (except under a match failure
with (*COMMIT), and the code we're interested is only executed on success).

So simplify to just PL_regeol - strbeg.
regexec.c