This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Use data structure properties to remove tests
authorKarl Williamson <public@khwilliamson.com>
Tue, 3 Jul 2012 02:50:33 +0000 (20:50 -0600)
committerKarl Williamson <public@khwilliamson.com>
Wed, 25 Jul 2012 03:13:44 +0000 (21:13 -0600)
commit575a8a29f39b3d855395253b9ccab1549a4f1bf9
tree59c18272c55c1a11f7f8c4093b287f4c4350daf6
parent66c6912424f787a27c1af7036d53cceb315da7c2
regcomp.c: Use data structure properties to remove tests

The ANYOF_foo character class #defines really form an enum, with the
property that the regular one is n, and its complement is n+1.  So
we can replace the tests in each case: of the switch, with a single test
afterwards.
regcomp.c
regcomp.h