diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-02-03 10:32:15 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-02-09 10:13:54 -0700 |
commit | 52ae8f7ebb1f32bbd4f574c090ff4ae9d6b468c7 (patch) | |
tree | 77b71b06f5772f2e2ad5e2b8a849759d5f5591c6 /embed.h | |
parent | 112b0fc601abb62ef38610a2a8edb67f8f59fade (diff) | |
download | perl-52ae8f7ebb1f32bbd4f574c090ff4ae9d6b468c7.tar.gz |
regcomp.c: Add ability to take intersection of complement
It turns out that it is a common paradigm to want to take the
intersection of an inversion list with the complement of another
inversion list. In fact, this is the how to subtract the second
inversion list from the first, as what remains in the first after the
subtraction is everything in it that is not in the second.
It also turns out that it adds very few cycles to an intersection to
complement one (or both, should we choose to) of the operands. By
adding this capability, we don't have to create a copy of the inverted
operand beforehand, just to throw it away.
Diffstat (limited to 'embed.h')
-rw-r--r-- | embed.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -949,7 +949,7 @@ # endif # if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) #define _append_range_to_invlist(a,b,c) Perl__append_range_to_invlist(aTHX_ a,b,c) -#define _invlist_intersection(a,b,c) Perl__invlist_intersection(aTHX_ a,b,c) +#define _invlist_intersection_maybe_complement_2nd(a,b,c,d) Perl__invlist_intersection_maybe_complement_2nd(aTHX_ a,b,c,d) #define _invlist_invert(a) Perl__invlist_invert(aTHX_ a) #define _invlist_invert_prop(a) Perl__invlist_invert_prop(aTHX_ a) #define _invlist_populate_swatch(a,b,c,d) Perl__invlist_populate_swatch(aTHX_ a,b,c,d) |