STATIC void
S_cl_anything(pTHX_ struct regnode_charclass_class *cl)
{
+ int value;
+
ANYOF_CLASS_ZERO(cl);
- ANYOF_BITMAP_SETALL(cl);
+ for (value = 0; value < 256; ++value)
+ ANYOF_BITMAP_SET(cl, value);
cl->flags = ANYOF_EOS;
if (LOC)
cl->flags |= ANYOF_LOCALE;
for (value = 0; value <= ANYOF_MAX; value += 2)
if (ANYOF_CLASS_TEST(cl, value) && ANYOF_CLASS_TEST(cl, value + 1))
return 1;
- for (value = 0; value < ANYOF_BITMAP_SIZE; ++value)
- if (!ANYOF_BITMAP_BYTE(cl, value))
+ for (value = 0; value < 256; ++value)
+ if (!ANYOF_BITMAP_TEST(cl, value))
return 0;
return 1;
}
#define ANYOF_CLASS_ZERO(ret) Zero(((struct regnode_charclass_class*)(ret))->classflags, ANYOF_CLASSBITMAP_SIZE, char)
#define ANYOF_BITMAP_ZERO(ret) Zero(((struct regnode_charclass*)(ret))->bitmap, ANYOF_BITMAP_SIZE, char)
-#define ANYOF_BITMAP_SETALL(p) (memset(ANYOF_BITMAP(p), 0xff, ANYOF_BITMAP_SIZE))
#define ANYOF_BITMAP(p) (((struct regnode_charclass*)(p))->bitmap)
#define ANYOF_BITMAP_BYTE(p, c) (ANYOF_BITMAP(p)[((c) >> 3) & 31])