diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-27 12:34:41 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-12-28 10:38:55 -0700 |
commit | b25a103638bc5111446c1e65a21db00a6e13acc1 (patch) | |
tree | 496e9f487f356e04e3199d2f8d1938aa5f588dfc /regcomp.h | |
parent | f0c12ea8fdc0aca86872e322ec9009f1e933f9ed (diff) | |
download | perl-b25a103638bc5111446c1e65a21db00a6e13acc1.tar.gz |
regcomp.c: Clean up ANYOF_CLASS handling.
The ANYOF_CLASS flag is used in ANYOF nodes (for [bracketed] and the
synthetic start class) only when matching something like \w, [:punct:]
etc., under /l (locale). It should not be set unless /l is specified.
However, it was always getting set for the synthetic start class. This
commit fixes that. The previous code was masking errors in which it was
being tested for unnecessarily, and for much of the 5.17 series, the
synthetic start class was always set to test for locale, which was a
waste of cpu when no locale was specified.
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -488,7 +488,7 @@ struct regnode_charclass_class { #define ANYOF_CLASS_SKIP ((ANYOF_CLASS_SIZE - 1)/sizeof(regnode)) #define ANYOF_CLASS_TEST_ANY_SET(p) \ - ((ANYOF_FLAGS(p) & (ANYOF_CLASS|ANYOF_IS_SYNTHETIC)) \ + ((ANYOF_FLAGS(p) & ANYOF_CLASS) \ && (((struct regnode_charclass_class*)(p))->classflags)) /*#define ANYOF_CLASS_ADD_SKIP (ANYOF_CLASS_SKIP - ANYOF_SKIP) * */ |