This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_match(): clarify intuit parens behaviour
authorDavid Mitchell <davem@iabyn.com>
Tue, 22 May 2012 09:40:55 +0000 (10:40 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:32:53 +0000 (13:32 +0100)
commit7e1a2c8d3379302594e45d7ac3b09fd4b6477ffc
tree5d0e695aeea423523e3c1b4dc5658960f9e28308
parentf067efbfa97c3658b1cf186884f09e38fcee1876
pp_match(): clarify intuit parens behaviour

There was some dodgy code, (flagged by dmq), that as well
as setting RX_LASTPAREN(rx),  RX_LASTCLOSEPAREN(rx) to zero,
also set RX_NPARENS(rx) to zero.

The actual logic is that if we reach that point, the pattern shouldn't
have any capturing parentheses, so instead of assigning zero to it, assert
that RX_NPARENS(rx) is zero.
pp_hot.c