From 94a86fe0a1d133afd8c3bd5c9f288e8089154a97 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 25 Jul 2015 20:58:57 +0100 Subject: Avoid large enums. --- contrib/aho-corasick/_acism.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'contrib/aho-corasick') diff --git a/contrib/aho-corasick/_acism.h b/contrib/aho-corasick/_acism.h index b994bf073..057bc31c3 100644 --- a/contrib/aho-corasick/_acism.h +++ b/contrib/aho-corasick/_acism.h @@ -42,11 +42,9 @@ typedef int (*qsort_cmp)(const void *, const void *); typedef uint16_t SYMBOL; typedef unsigned _SYMBOL; // An efficient stacklocal SYMBOL -enum { - IS_MATCH = (TRAN)1 << (8*sizeof(TRAN) - 1), - IS_SUFFIX = (TRAN)1 << (8*sizeof(TRAN) - 2), - T_FLAGS = IS_MATCH | IS_SUFFIX -}; +#define IS_MATCH ((TRAN)1 << (8*sizeof(TRAN) - 1)) +#define IS_SUFFIX ((TRAN)1 << (8*sizeof(TRAN) - 2)) +#define T_FLAGS (IS_MATCH | IS_SUFFIX) typedef struct { STATE state; STRNO strno; } STRASH; -- cgit v1.2.3