[MLton-commit] r5999

Matthew Fluet fluet at mlton.org
Mon Sep 3 11:21:12 PDT 2007


Fixed bug in implementation of _export functions using 'char' type
----------------------------------------------------------------------

U   mlton/trunk/basis-library/mlton/ffi.sml
U   mlton/trunk/doc/changelog

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/mlton/ffi.sml
===================================================================
--- mlton/trunk/basis-library/mlton/ffi.sml	2007-09-03 13:32:28 UTC (rev 5998)
+++ mlton/trunk/basis-library/mlton/ffi.sml	2007-09-03 18:21:11 UTC (rev 5999)
@@ -47,17 +47,17 @@
 val atomicEnd = MLtonThread.atomicEnd
 val register = MLtonThread.register
 
-(* To the C-world, chars are signed integers. *)
-val getChar8 = Primitive.Char8.idFromInt8 o getInt8
+(* To the C-world, chars are unsigned integers. *)
+val getChar8 = Primitive.Char8.idFromWord8 o getWord8
 (*
-val getChar16 = Primitive.Char16.idFromInt16 o getInt16
-val getChar32 = Primitive.Char32.idFromInt32 o getInt32
+val getChar16 = Primitive.Char16.idFromWord16 o getWord16
+val getChar32 = Primitive.Char32.idFromWord32 o getWord32
 *)
 
-val setChar8 = setInt8 o Primitive.Char8.idToInt8
+val setChar8 = setWord8 o Primitive.Char8.idToWord8
 (*
-val setChar16 = setInt16 o Primitive.Char16.idToInt16
-val setChar32 = setInt32 o Primitive.Char32.idToInt32
+val setChar16 = setWord16 o Primitive.Char16.idToWord16
+val setChar32 = setWord32 o Primitive.Char32.idToWord32
 *)
 
 (* To the C-world, booleans are 32-bit integers. *)

Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog	2007-09-03 13:32:28 UTC (rev 5998)
+++ mlton/trunk/doc/changelog	2007-09-03 18:21:11 UTC (rev 5999)
@@ -1,3 +1,11 @@
+Here are the changes from version 20070826 to version YYYYMMDD.
+
+* 2007-09-03
+   - Fixed bug in implementation of _export of functions using 'char'
+     type.  Thanks to Katsuhiro Ueno for the bug report.
+
+--------------------------------------------------------------------------------
+
 Here are the changes from version 20051202 to version 20070826.
 
 Summary:




More information about the MLton-commit mailing list