From a5c00b144c8d66ed22a80b227307da522572c65f Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sun, 20 Mar 2016 09:43:20 -0400 Subject: ocaml and c chars are incompatible --- lisc/tools/abi.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisc/tools') diff --git a/lisc/tools/abi.ml b/lisc/tools/abi.ml index c5e18c1..61b5423 100644 --- a/lisc/tools/abi.ml +++ b/lisc/tools/abi.ml @@ -1,7 +1,7 @@ (* fuzzer *) type _ bty = - | Char: char bty + | Char: int bty | Short: int bty | Int: int bty | Long: int bty @@ -67,7 +67,7 @@ module Gen = struct let tb: type a. a bty -> a = function (* eh, dry... *) | Float -> float () | Double -> float () - | Char -> Char.chr (R.int 255) + | Char -> int (btysize Char) | Short -> int (btysize Short) | Int -> int (btysize Int) | Long -> int (btysize Long) in @@ -145,7 +145,7 @@ module OutC = struct let init oc name (T (ty, t)) = let initb: type a. a bty * a -> unit = function - | Char, c -> fprintf oc "%C" c + | Char, i -> fprintf oc "%d" i | Short, i -> fprintf oc "%d" i | Int, i -> fprintf oc "%d" i | Long, i -> fprintf oc "%d" i -- cgit 1.4.1