0.9.11.11: fix SET-SYNTAX-FROM-CHAR buglet
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 5 Apr 2006 07:08:32 +0000 (07:08 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 5 Apr 2006 07:08:32 +0000 (07:08 +0000)
NEWS
src/code/reader.lisp
src/compiler/fndb.lisp
tests/reader.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 7257736..35e72ee 100644 (file)
--- 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.
index 243fd0c..69a853f 100644 (file)
     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))
index eb06b68..70a34cf 100644 (file)
 (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)
index 5b35f78..8b60a5d 100644 (file)
 
 (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
index 490f268..1e0cf6d 100644 (file)
@@ -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"