From: Tobias C. Rittweiler Date: Mon, 4 Jan 2010 15:55:21 +0000 (+0000) Subject: 1.0.34.3: Fix second return value of GET-MACRO-CHARACTER. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=b2365f5ca2919ad48e1dbc7ac4e4e5b2063d16b7;p=sbcl.git 1.0.34.3: Fix second return value of GET-MACRO-CHARACTER. GET-MACRO-CHARACTER always refered to *READTABLE* when computing its second return value (the non-terminating-p flag) rather than to the readtable that may have been passed explicitly. --- diff --git a/NEWS b/NEWS index f7ea50f..fad4188 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,8 @@ ;;;; -*- coding: utf-8; fill-column: 78 -*- +changes relative to sbcl-1.0.34: + * bug fix: GET-MACRO-CHARACTER bogusly computed its second return value + always relative to *READTABLE* rather than the passed argument. + changes in sbcl-1.0.34 relative to sbcl-1.0.33: * minor incompatible change: threading support is now enabled by default on x86[-64] Linux. diff --git a/src/code/reader.lisp b/src/code/reader.lisp index 308d3dd..27ec01a 100644 --- a/src/code/reader.lisp +++ b/src/code/reader.lisp @@ -292,8 +292,8 @@ standard Lisp readtable when NIL." (values fun-value ;; NON-TERMINATING-P return value: (if fun-value - (or (constituentp char) - (not (terminating-macrop char))) + (or (constituentp char designated-readtable) + (not (terminating-macrop char designated-readtable))) ;; ANSI's definition of GET-MACRO-CHARACTER says this ;; value is NIL when CHAR is not a macro character. ;; I.e. this value means not just "non-terminating diff --git a/tests/reader.pure.lisp b/tests/reader.pure.lisp index 7f88b03..a127d31 100644 --- a/tests/reader.pure.lisp +++ b/tests/reader.pure.lisp @@ -245,3 +245,13 @@ (read-from-string "CL-USER:DOES-NOT-EXIST") (reader-error (c) (princ c)))) + +;;; The GET-MACRO-CHARACTER in SBCL <= "1.0.34.2" bogusly computed its +;;; second return value relative to *READTABLE* rather than the passed +;;; readtable. +(let* ((*readtable* (copy-readtable nil))) + (set-syntax-from-char #\" #\A) + (multiple-value-bind (reader-fn non-terminating-p) + (get-macro-character #\" (copy-readtable nil)) + (declare (ignore reader-fn)) + (assert (not non-terminating-p)))) \ No newline at end of file diff --git a/version.lisp-expr b/version.lisp-expr index f5b67bc..e8a3822 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.34.2" +"1.0.34.3"