1.0.32.2: minor portability fix
authorChristophe Rhodes <csr21@cantab.net>
Thu, 29 Oct 2009 15:36:15 +0000 (15:36 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Thu, 29 Oct 2009 15:36:15 +0000 (15:36 +0000)
Clozure CL issues full warnings at compile time if individual clauses in
typecases are shadowed by others; this makes writing portable
warning-free typecases for character types a little bit tricky.  In the
case of the FORMAT directive finders, though, the workaround is
straightforward because the whole of the CHARACTER branch in the
typecases can be removed.

While we're at it, fix the theoretical portability bug that we were
calling the host's CHAR-CODE on BASE-CHARs to fill data structures later
to be accessed using the target's CHAR-CODE.  (Theoretical because all
implementations at present agree on CHAR-CODE for BASE-CHARs).

(This commit does not suffice to allow Clozure CL to build SBCL)

CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS:  NEWS version.lisp-expr src/code/late-format.lisp
CVS:  src/code/target-format.lisp
CVS: ----------------------------------------------------------------------

NEWS
src/code/late-format.lisp
src/code/target-format.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index a617c05..9545ab1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
 ;;;; -*- coding: utf-8; fill-column: 78 -*-
-changes relative to sbcl-1.0.31:
+changes relative to sbcl-1.0.32:
   * bug fix: restore buildability on the MIPS platform.  (regression from
     1.0.30.38, reported by Samium Gromoff)
 
index 5315b24..9b339c6 100644 (file)
             (let ((char (format-directive-character directive)))
               (typecase char
                 (base-char
-                 (aref *format-directive-expanders* (char-code char)))
-                (character nil))))
+                 (aref *format-directive-expanders* (sb!xc:char-code char))))))
            (*default-format-error-offset*
             (1- (format-directive-end directive))))
        (declare (type (or null function) expander))
 (eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute)
 
 (defun %set-format-directive-expander (char fn)
-  (setf (aref *format-directive-expanders* (char-code (char-upcase char))) fn)
+  (let ((code (sb!xc:char-code (char-upcase char))))
+    (setf (aref *format-directive-expanders* code) fn))
   char)
 
 (defun %set-format-directive-interpreter (char fn)
-  (setf (aref *format-directive-interpreters*
-              (char-code (char-upcase char)))
-        fn)
+  (let ((code (sb!xc:char-code (char-upcase char))))
+    (setf (aref *format-directive-interpreters* code) fn))
   char)
 
 (defun find-directive (directives kind stop-at-semi)
index 792e610..8478a22 100644 (file)
@@ -78,8 +78,7 @@
                       (function
                        (typecase character
                          (base-char
-                          (svref *format-directive-interpreters* (char-code character)))
-                         (character nil)))
+                          (svref *format-directive-interpreters* (char-code character)))))
                       (*default-format-error-offset*
                        (1- (format-directive-end directive))))
                  (unless function
index 11ebcbb..05ccd09 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".)
-"1.0.32.1"
+"1.0.32.2"