From: Yves Orton Date: Sat, 17 Jun 2006 16:44:17 +0000 (+0200) Subject: Comply with the 0x80th commandment X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5dfe062f6f5bff2cd3d8cf5de68c1a69d6de6f1d;p=p5sagit%2Fp5-mst-13.2.git Comply with the 0x80th commandment Message-Id: <9b18b3110606170744x60f4074bg11bf0f4c87eeb6c1@mail.gmail.com> add some (U8) casts p4raw-id: //depot/perl@28400 --- diff --git a/regcomp.h b/regcomp.h index c81c286..b1f953e 100644 --- a/regcomp.h +++ b/regcomp.h @@ -489,10 +489,10 @@ typedef struct _reg_ac_data reg_ac_data; three different sets... */ #define TRIE_BITMAP(p) (((reg_trie_data *)(p))->bitmap) -#define TRIE_BITMAP_BYTE(p, c) (TRIE_BITMAP(p)[((c) >> 3) & 31]) -#define TRIE_BITMAP_SET(p, c) (TRIE_BITMAP_BYTE(p, c) |= ANYOF_BIT(c)) -#define TRIE_BITMAP_CLEAR(p,c) (TRIE_BITMAP_BYTE(p, c) &= ~ANYOF_BIT(c)) -#define TRIE_BITMAP_TEST(p, c) (TRIE_BITMAP_BYTE(p, c) & ANYOF_BIT(c)) +#define TRIE_BITMAP_BYTE(p, c) (TRIE_BITMAP(p)[(((U8)c) >> 3) & 31]) +#define TRIE_BITMAP_SET(p, c) (TRIE_BITMAP_BYTE(p, c) |= ANYOF_BIT((U8)c)) +#define TRIE_BITMAP_CLEAR(p,c) (TRIE_BITMAP_BYTE(p, c) &= ~ANYOF_BIT((U8)c)) +#define TRIE_BITMAP_TEST(p, c) (TRIE_BITMAP_BYTE(p, c) & ANYOF_BIT((U8)c)) /* these defines assume uniquecharcount is the correct variable, and state may be evaluated twice */