This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In regcomp.c, Set_Node_Cur_Length() uses parse_start, so explicitly pass it.
authorNicholas Clark <nick@ccl4.org>
Wed, 5 Jun 2013 10:15:57 +0000 (12:15 +0200)
committerNicholas Clark <nick@ccl4.org>
Thu, 6 Jun 2013 07:39:30 +0000 (09:39 +0200)
commit6a86c6ad94ba9f2a00d21db1a38c46b8c011f213
tree8375715271e5b00f5781299eea572993632ec91e
parent1c432b0bcd1dc0559b55d564f4e26ad2e753efd3
In regcomp.c, Set_Node_Cur_Length() uses parse_start, so explicitly pass it.

The macro Set_Node_Cur_Length() had been referring to the variable
parse_start within its body. This somewhat secret reference is potentially
risky, as it was always taking a parameter node, hence one might assume that
that was all that it used, and change the value stored in parse_start.
(Specifically, one place that assigns RExC_parse - 1 to parse_start, and later
uses parse_start + 1, which looks like an obvious cleanup candidate)

So make parse_start an explicit parameter.

Also, eliminate the never-used macro Set_Cur_Node_Length. This was added as
part of commit fac927409d5ddf11 (April 2001) but never used.
regcomp.c