summary refs log tree commit diff
path: root/lisc/tools/abi.ml
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-20 09:43:20 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-20 09:43:20 -0400
commita5c00b144c8d66ed22a80b227307da522572c65f (patch)
tree1ee465a303a3b0d106d0414c5c3444abca567944 /lisc/tools/abi.ml
parentf0a91ffe5ec42e99d28a89e44162cd70021aa8bb (diff)
downloadroux-a5c00b144c8d66ed22a80b227307da522572c65f.tar.gz
ocaml and c chars are incompatible
Diffstat (limited to 'lisc/tools/abi.ml')
-rw-r--r--lisc/tools/abi.ml6
1 files changed, 3 insertions, 3 deletions
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