From 20c0ab0df7e895d55ef79cfe815e3d58870703a3 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Wed, 5 Apr 2006 07:08:32 +0000 Subject: [PATCH] 0.9.11.11: fix SET-SYNTAX-FROM-CHAR buglet --- NEWS | 2 ++ src/code/reader.lisp | 9 ++++----- src/compiler/fndb.lisp | 2 +- tests/reader.impure.lisp | 7 +++++++ version.lisp-expr | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 7257736..35e72ee 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ changes in sbcl-0.9.12 relative to sbcl-0.9.11: * bug fix: LISTEN sometimes returned T even in cases where no data was immediately available from the stream + * fixed bug: types of the last two arguments to SET-SYNTAX-FROM-CHAR + were reversed. (reported by Levente Mészáros) * fixed some bugs revealed by Paul Dietz' test suite: ** REMOVE-METHOD returns its generic function argument even when the method is not one of the generic functions' methods. diff --git a/src/code/reader.lisp b/src/code/reader.lisp index 243fd0c..69a853f 100644 --- a/src/code/reader.lisp +++ b/src/code/reader.lisp @@ -215,12 +215,11 @@ really-to-readtable)) (defun set-syntax-from-char (to-char from-char &optional - (to-readtable *readtable*) - (from-readtable ())) + (to-readtable *readtable*) (from-readtable ())) #!+sb-doc - "Causes the syntax of TO-CHAR to be the same as FROM-CHAR in the - optional readtable (defaults to the current readtable). The - FROM-TABLE defaults to the standard Lisp readtable when NIL." + "Causes the syntax of TO-CHAR to be the same as FROM-CHAR in the optional +readtable (defaults to the current readtable). The FROM-TABLE defaults to the +standard Lisp readtable when NIL." (let ((really-from-readtable (or from-readtable *standard-readtable*))) (let ((att (get-cat-entry from-char really-from-readtable)) (mac (get-raw-cmt-entry from-char really-from-readtable)) diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index eb06b68..70a34cf 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -981,7 +981,7 @@ (defknown readtablep (t) boolean (movable foldable flushable)) (defknown set-syntax-from-char - (character character &optional (or readtable null) readtable) (eql t) + (character character &optional readtable (or readtable null)) (eql t) ()) (defknown set-macro-character (character callable &optional t readtable) diff --git a/tests/reader.impure.lisp b/tests/reader.impure.lisp index 5b35f78..8b60a5d 100644 --- a/tests/reader.impure.lisp +++ b/tests/reader.impure.lisp @@ -102,4 +102,11 @@ (assert (eq 'a (read (make-instance 'my-in-stream :last-char nil)))) +;;; NIL as the last argument to SET-SYNTAX-FROM-CHAR in compiled code, +;;; reported by Levente Mészáros +(let ((fun (compile nil '(lambda () + (set-syntax-from-char #\{ #\( *readtable* nil))))) + (funcall fun) + (assert (equal '(:ok) (read-from-string "{:ok)")))) + ;;; success diff --git a/version.lisp-expr b/version.lisp-expr index 490f268..1e0cf6d 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".) -"0.9.11.10" +"0.9.11.11" -- 1.7.10.4