From: William Harold Newman Date: Tue, 8 Apr 2003 00:36:04 +0000 (+0000) Subject: 0.pre8.46: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=a78d05d9bbcf148f8610c1b6f3140139989ca227;p=sbcl.git 0.pre8.46: merged Tony Martinez' protection-from-#.*STREAM* patch (sbcl-devel 2003-04-07) --- diff --git a/src/code/inspect.lisp b/src/code/inspect.lisp index ed2b175..90025b5 100644 --- a/src/code/inspect.lisp +++ b/src/code/inspect.lisp @@ -55,10 +55,11 @@ evaluated expressions. (named-let reread () (format s "~&> ") (force-output) - (let (;; KMP idiom, using stream itself as EOF value - (command (read *standard-input* nil *standard-input*))) - (typecase command - (stream ; i.e. EOF + (let* (;; newly-consed object for hermetic protection against + ;; mischievous input like #.*EOF-OBJECT*: + (eof (cons *eof-object* nil)) + (command (read *standard-input* nil eof))) + (when (eq command eof) ;; currently-undocumented feature: EOF is handled as Q. ;; If there's ever consensus that this is *the* right ;; thing to do (as opposed to e.g. handling it as U), we @@ -66,6 +67,7 @@ evaluated expressions. ;; do this than to signal an error. (/show0 "THROWing QUIT-INSPECT for EOF") (throw 'quit-inspect nil)) + (typecase command (integer (let ((elements-length (length elements))) (cond ((< -1 command elements-length) diff --git a/version.lisp-expr b/version.lisp-expr index 860d6a7..753fa1a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.pre8.44" +"0.pre8.46"