Permalink
Browse files

Moved debug test from %STREAM-UNREAD-CHAR to STREAM-UNREAD-CHAR.

Signed-off-by: Stelian Ionescu <sionescu@common-lisp.net>
  • Loading branch information...
1 parent ab02af6 commit 2992c8392fbacdb603a4437559620236fc91aa98 @sionescu committed Apr 26, 2007
Showing with 9 additions and 7 deletions.
  1. +9 −7 sockets/gray-stream-methods.lisp
@@ -450,14 +450,7 @@
(char str 0)))))
(defun %stream-unread-char (stream)
- ;; unreading anything but the latest character is wrong,
- ;; but checking is not mandated by the standard
(declare (type active-socket stream))
- #+iolib-debug
- (progn
- (%stream-unread-char stream)
- (unless (ignore-errors (eql (stream-read-char stream) character))
- (error "Trying to unread wrong character ~S" character)))
(with-accessors ((ib input-buffer-of)
(unread-index ibuf-unread-index-of)) stream
(symbol-macrolet ((start (iobuf-start ib)))
@@ -469,7 +462,16 @@
nil)
(defmethod stream-unread-char ((stream active-socket) character)
+ ;; unreading anything but the latest character is wrong,
+ ;; but checking is not mandated by the standard
+ #+iolib-debug
+ (progn
+ (%stream-unread-char stream)
+ (unless (ignore-errors (eql (stream-read-char stream) character))
+ (error "Trying to unread wrong character ~S" character)))
+ #-iolib-debug
(declare (ignore character))
+ #-iolib-debug
(%stream-unread-char stream))
(defmethod stream-peek-char ((stream active-socket))

0 comments on commit 2992c83

Please sign in to comment.