summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-03-19 15:10:21 -0600
committerKarl Williamson <public@khwilliamson.com>2011-03-19 19:01:36 -0600
commitab753c704251a1589ba158e73b1b32f1f9b738de (patch)
treef6484c070d5a63d78341debcdfcb1b4f9df52897 /regcomp.h
parent88d45ddf4468f3b425e8e14172967041df8c8bdb (diff)
downloadperl-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/regcomp.h b/regcomp.h
index b701cb6681..a9b270039a 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -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)