commit a5c00b144c8d66ed22a80b227307da522572c65f
parent f0a91ffe5ec42e99d28a89e44162cd70021aa8bb
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Sun, 20 Mar 2016 09:43:20 -0400
ocaml and c chars are incompatible
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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