[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 10/47: Handle zero-length bytevectors correctly in (syst
From: |
Andy Wingo |
Subject: |
[Guile-commits] 10/47: Handle zero-length bytevectors correctly in (system base types). |
Date: |
Sun, 22 May 2016 18:23:03 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 7b1069269b14b24a52cc5b315b215f8691978165
Author: Mark H Weaver <address@hidden>
Date: Thu Mar 26 23:13:47 2015 -0400
Handle zero-length bytevectors correctly in (system base types).
* module/system/base/types.scm (cell->object): Use 'get-bytevector-n'
instead of 'get-bytevector-all', so that the zero-length case does not
return EOF.
---
module/system/base/types.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/module/system/base/types.scm b/module/system/base/types.scm
index 7368171..0e7371b 100644
--- a/module/system/base/types.scm
+++ b/module/system/base/types.scm
@@ -444,7 +444,7 @@ using BACKEND."
('big "UTF-32BE")))))
(((_ & #x7f = %tc7-bytevector) len address)
(let ((bv-port (memory-port backend address len)))
- (get-bytevector-all bv-port)))
+ (get-bytevector-n bv-port len)))
((((len << 8) || %tc7-vector))
(let ((words (get-bytevector-n port (* len %word-size)))
(vector (make-vector len)))
- [Guile-commits] branch master updated (fd17cf9 -> 2badbd0), Andy Wingo, 2016/05/22
- [Guile-commits] 10/47: Handle zero-length bytevectors correctly in (system base types).,
Andy Wingo <=
- [Guile-commits] 06/47: tests: Gracefully handle ENOSYS return for 'setaffinity'., Andy Wingo, 2016/05/22
- [Guile-commits] 02/47: http: Do not buffer HTTP chunks., Andy Wingo, 2016/05/22
- [Guile-commits] 16/47: doc: Fix parameter of 'set-record-type-printer!'., Andy Wingo, 2016/05/22
- [Guile-commits] 20/47: Clarify datum->syntax documentation., Andy Wingo, 2016/05/22
- [Guile-commits] 17/47: Fix atan procedure when applied to complex numbers., Andy Wingo, 2016/05/22
- [Guile-commits] 23/47: doc: Fix menu order for SXML., Andy Wingo, 2016/05/22
- [Guile-commits] 30/47: Add new Linux errno constants., Andy Wingo, 2016/05/22
- [Guile-commits] 29/47: Fix the rule to check for new signals and errors, Andy Wingo, 2016/05/22
- [Guile-commits] 35/47: doc: Mention a known-good Flex version number., Andy Wingo, 2016/05/22
- [Guile-commits] 27/47: web: Gracefully handle premature EOF when reading chunk header., Andy Wingo, 2016/05/22