diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-03-19 15:10:21 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-03-19 19:01:36 -0600 |
commit | ab753c704251a1589ba158e73b1b32f1f9b738de (patch) | |
tree | f6484c070d5a63d78341debcdfcb1b4f9df52897 /regcomp.h | |
parent | 88d45ddf4468f3b425e8e14172967041df8c8bdb (diff) | |
download | perl-ab753c704251a1589ba158e73b1b32f1f9b738de.tar.gz |
regcomp.h: Add ANYOF_CLASS_SETALL()
This macro sets all the bits of the class (for \w, etc) for use during
initialization
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -439,6 +439,8 @@ struct regnode_charclass_class { #define ANYOF_CLASS_TEST(p, c) (ANYOF_CLASS_BYTE(p, c) & ANYOF_BIT(c)) #define ANYOF_CLASS_ZERO(ret) Zero(((struct regnode_charclass_class*)(ret))->classflags, ANYOF_CLASSBITMAP_SIZE, char) +#define ANYOF_CLASS_SETALL(ret) \ + memset (((struct regnode_charclass_class*)(ret))->classflags, 255, ANYOF_CLASSBITMAP_SIZE) #define ANYOF_BITMAP_ZERO(ret) Zero(((struct regnode_charclass*)(ret))->bitmap, ANYOF_BITMAP_SIZE, char) #define ANYOF_BITMAP(p) (((struct regnode_charclass*)(p))->bitmap) |