[armedbear-cvs] r14070 - trunk/abcl/src/org/armedbear/lisp
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Sat Aug 11 12:07:53 UTC 2012
Author: ehuelsmann
Date: Sat Aug 11 05:07:52 2012
New Revision: 14070
Log:
Expand types before checking them: fixes Drakma.
Patch by Stas Boukarev.
Modified:
trunk/abcl/src/org/armedbear/lisp/byte-io.lisp
trunk/abcl/src/org/armedbear/lisp/read-sequence.lisp
trunk/abcl/src/org/armedbear/lisp/write-sequence.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/byte-io.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/byte-io.lisp Sat Aug 11 02:43:16 2012 (r14069)
+++ trunk/abcl/src/org/armedbear/lisp/byte-io.lisp Sat Aug 11 05:07:52 2012 (r14070)
@@ -33,7 +33,7 @@
(defun write-byte (byte stream)
(declare (type stream stream))
- (let ((element-type (stream-element-type stream)))
+ (let ((element-type (expand-deftype (stream-element-type stream))))
(require-type byte element-type)
(let ((width (cadr element-type)))
(if (= width 8)
@@ -48,7 +48,7 @@
(defun read-byte (stream &optional (eof-error-p t) eof-value)
(declare (type stream stream))
- (let* ((element-type (stream-element-type stream)))
+ (let* ((element-type (expand-deftype (stream-element-type stream))))
(unless element-type
(if eof-error-p
(error 'end-of-file :stream stream)
Modified: trunk/abcl/src/org/armedbear/lisp/read-sequence.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/read-sequence.lisp Sat Aug 11 02:43:16 2012 (r14069)
+++ trunk/abcl/src/org/armedbear/lisp/read-sequence.lisp Sat Aug 11 05:07:52 2012 (r14070)
@@ -37,7 +37,7 @@
(if end
(require-type end '(integer 0))
(setf end (length sequence)))
- (let* ((element-type (stream-element-type stream)))
+ (let* ((element-type (expand-deftype (stream-element-type stream))))
(cond ((eq element-type 'character)
(do ((pos start (1+ pos)))
((>= pos end) pos)
Modified: trunk/abcl/src/org/armedbear/lisp/write-sequence.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/write-sequence.lisp Sat Aug 11 02:43:16 2012 (r14069)
+++ trunk/abcl/src/org/armedbear/lisp/write-sequence.lisp Sat Aug 11 05:07:52 2012 (r14070)
@@ -45,7 +45,7 @@
:expected-type '(integer 0)))
(setf end (length sequence)))
(let ((end (the fixnum end))
- (stream-element-type (stream-element-type stream)))
+ (stream-element-type (expand-deftype (stream-element-type stream))))
(cond ((eq stream-element-type 'character)
(if (stringp sequence)
(%write-string sequence stream start end)
More information about the armedbear-cvs
mailing list