mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +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:
parent
2b509a2e37
commit
f2de4fac88
1 changed files with 3 additions and 1 deletions
|
@ -428,7 +428,9 @@ using BACKEND."
|
||||||
(stringbuf (bytevector->string buf "ISO-8859-1")))
|
(stringbuf (bytevector->string buf "ISO-8859-1")))
|
||||||
(((_ & #x047f = (bitwise-ior #x400 %tc7-stringbuf))
|
(((_ & #x047f = (bitwise-ior #x400 %tc7-stringbuf))
|
||||||
len (bytevector buf (* 4 len)))
|
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)
|
(((_ & #x7f = %tc7-bytevector) len address)
|
||||||
(let ((bv-port (memory-port backend address len)))
|
(let ((bv-port (memory-port backend address len)))
|
||||||
(get-bytevector-all bv-port)))
|
(get-bytevector-all bv-port)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue