1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

Fix (system base types) on big-endian systems.

* module/system/base/types.scm (cell->object): When reading stringbufs,
  use UTF-32BE on big-endian systems.
This commit is contained in:
Mark H Weaver 2014-03-15 13:23:21 -04:00
parent 2b509a2e37
commit f2de4fac88

View file

@ -428,7 +428,9 @@ using BACKEND."
(stringbuf (bytevector->string buf "ISO-8859-1")))
(((_ & #x047f = (bitwise-ior #x400 %tc7-stringbuf))
len (bytevector buf (* 4 len)))
(stringbuf (bytevector->string buf "UTF-32LE")))
(stringbuf (bytevector->string buf (match (native-endianness)
('little "UTF-32LE")
('big "UTF-32BE")))))
(((_ & #x7f = %tc7-bytevector) len address)
(let ((bv-port (memory-port backend address len)))
(get-bytevector-all bv-port)))