This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
re_op_compile(): split flags into two arguments
authorDavid Mitchell <davem@iabyn.com>
Thu, 8 Dec 2011 15:43:41 +0000 (15:43 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:32:46 +0000 (13:32 +0100)
commit514a91f155137f90b0b252807e2c009f04c97938
tree43a22ccf6aa6cfa23c12f97827eb16ee3d1c210c
parent37acfcba9f5180cec9aa03bf3457caab7114230c
re_op_compile(): split flags into two arguments

There are two sets of regex-related flags; the RXf_* which
end up in the extflags field of a REGEXP, and the PMf_*, which
are in the op_pmflags field of a PMOP.

Since I added the PMf_HAS_CV and PMf_IS_QR flags, I've been conflating
these two meanings in the single flags arg to re_op_compile(), which meant
that some bits were being misinterpreted. The only test that was failing
was peek.t, but it may have quietly broken other things that simply
weren't tested for (for example PMf_HAS_CV and RXf_SPLIT share the same
value, so something with split qr/(?{...})/ might get messed up).

So, split this arg into two; one for the RXf* flags, and one for the PMf_*
flags.

The public regexp API continues to have only a single flags arg,
which should only be accepting RXf_* flags.
embed.fnc
embed.h
op.c
pp_ctl.c
proto.h
regcomp.c