From: Christophe Rhodes <csr21@cam.ac.uk>
Date: Mon, 23 Jun 2003 15:31:29 +0000 (+0000)
Subject: 0.8.0.78.vector-nil-string.6:
X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=64a7331285b0eab2c216f52670763c7d192cfdaa;p=sbcl.git

0.8.0.78.vector-nil-string.6:
	Cosmetic cleanups
	... invert the test in %SXHASH-SIMPLE-SUBSTRING, since that
		way it stands a chance of working even when putative
		(VECTOR CHARACTER) != (VECTOR BASE-CHAR)
	... some reasonable slight changes to RUN-PROGRAM / Unix
		environment stuff.

The ALIEN/C-STRING issue looks like it's not a problem; all of the work
there is explicitly done in terms of BASE-STRINGs.  I don't think anyone
is likely to complain at a type error should they attempt to pass an
object of (VECTOR NIL 0) to foreign lands as the null string, and even
if they do I feel unmotivated to care without sufficient inducement. :-)
---

diff --git a/src/code/run-program.lisp b/src/code/run-program.lisp
index 95ebb73..a04d1da 100644
--- a/src/code/run-program.lisp
+++ b/src/code/run-program.lisp
@@ -63,7 +63,7 @@
 (defun unix-environment-cmucl-from-sbcl (sbcl)
   (mapcan
    (lambda (string)
-     (declare (type simple-string string))
+     (declare (type simple-base-string string))
      (let ((=-pos (position #\= string :test #'equal)))
        (if =-pos
 	   (list
@@ -86,8 +86,8 @@
   (mapcar
    (lambda (cons)
      (destructuring-bind (key . val) cons
-       (declare (type keyword key) (type simple-string val))
-       (concatenate 'simple-string (symbol-name key) "=" val)))
+       (declare (type keyword key) (type simple-base-string val))
+       (concatenate 'simple-base-string (symbol-name key) "=" val)))
    cmucl))
 
 ;;;; Import wait3(2) from Unix.
@@ -483,8 +483,8 @@
 
    The &KEY arguments have the following meanings:
      :ENVIRONMENT
-        a list of SIMPLE-STRINGs describing the new Unix environment (as
-        in \"man environ\"). The default is to copy the environment of
+        a list of SIMPLE-BASE-STRINGs describing the new Unix environment
+        (as in \"man environ\"). The default is to copy the environment of
         the current process.
      :ENV
         an alternative lossy representation of the new Unix environment,
diff --git a/src/code/target-sxhash.lisp b/src/code/target-sxhash.lisp
index 56df709..74e739b 100644
--- a/src/code/target-sxhash.lisp
+++ b/src/code/target-sxhash.lisp
@@ -84,7 +84,7 @@
   (declare (type index count))
   (let ((result 408967240))
     (declare (type fixnum result))
-    (when (typep string 'base-string)
+    (unless (typep string '(vector nil))
       (dotimes (i count)
 	(declare (type index i))
 	(mixf result
diff --git a/version.lisp-expr b/version.lisp-expr
index 9cf83a9..577fda0 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.8.0.78.vector-nil-string.5"
+"0.8.0.78.vector-nil-string.6"