on master help sign in
Avoid a char/int warning
commitdd2867865b021f56a16df36192115c9d7b320232 authorNeil Mitchell <ndmitchell@gmail.com> dateThu 4 Jan 2018, 20:53 (9 years ago) parentb26ca41
1 file changed+2−2
gen/Lib.hs+2−2
gen/Lib.hs+2−2
@@ -102,8 +102,8 @@ implies known x = all (fromCharSet x) poss
102102
103103charSetC :: [CharSet] -> ([String], CharSet -> String)
104104charSetC sets =
105− (["static const char internal_parse_table[256] = {" ++ intercalate "," ("0":map disp chars) ++ "};"]
106− ,\x -> fromMaybe ("internal_parse_table[*p] & " ++ showBit (bit $ fromJust $ elemIndex x hard)) $ simple x)
105+ (["static const char table[256] = {" ++ intercalate "," ("0":map disp chars) ++ "};"]
106+ ,\x -> fromMaybe ("table[(int) *p] & " ++ showBit (bit $ fromJust $ elemIndex x hard)) $ simple x)
107107 where
108108 showBit x = "0x" ++ showHex (x :: Int) ""
109109 disp c = showBit $ foldr (.|.) 0 [bit i | (i, h) <- zip [0..] hard, fromCharSet h c]