[MLton-commit] r5172
Wesley Terpstra
wesley at mlton.org
Sun Feb 11 17:05:57 PST 2007
a stop-gap measure to fix endian issues related to widestrings
----------------------------------------------------------------------
U mlton/trunk/mlton/atoms/word-x-vector.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/atoms/word-x-vector.fun
===================================================================
--- mlton/trunk/mlton/atoms/word-x-vector.fun 2007-02-12 01:05:31 UTC (rev 5171)
+++ mlton/trunk/mlton/atoms/word-x-vector.fun 2007-02-12 01:05:56 UTC (rev 5172)
@@ -39,7 +39,11 @@
Char.fromInt (IntInf.toInt r) :: ac)
end
in
- loop (n, WordX.toIntInf w, ac)
+ (* Control.targetIsBigEndian is not always set, so
+ * only use it if we really need to know the value. *)
+ if n > 8 andalso Control.targetIsBigEndian ()
+ then rev (loop (n, WordX.toIntInf w, [])) @ ac
+ else loop (n, WordX.toIntInf w, []) @ ac
end)))
end
More information about the MLton-commit
mailing list