From: Christophe Rhodes Date: Mon, 9 Sep 2013 14:09:42 +0000 (+0100) Subject: rename SB-SIMPLE-STREAMS utility function X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=2fb9cd4a2286b82e065d6c673d91e46bd7f2194d;p=sbcl.git rename SB-SIMPLE-STREAMS utility function At least, I think it was simply intended to be a utility function, but the FILE-NAMESTRING name is unfortunate, as that's a CL function, and (for other reasons) SB-SIMPLE-STREAMS claims to implement CL in the package lock sense, so this was not noticed at the time. This fixes lp#884603; I am unconvinced that the namestring logic is actually correct (keeping the distinction between NAMESTRING and NATIVE-NAMESTRING clear) but I'll wait for an actual user to complain about that before thinking too hard. --- diff --git a/NEWS b/NEWS index dcf1994..fa9a742 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,8 @@ changes relative to sbcl-1.1.11: (thanks to Jan Moringen, lp#1179858) * bug fix: the compiler-macro for MAKE-INSTANCE when emitting "fallback" constructors handles non-KEYWORD initialization arguments more correctly. + * bug fix: loading the SB-SIMPLE-STREAMS contributed module no longer + clobbers FILE-NAMESTRING. (thanks to Anton Kovalenko, lp#884603) changes in sbcl-1.1.11 relative to sbcl-1.1.10: * enhancement: support building the manual under texinfo version 5. diff --git a/contrib/sb-simple-streams/file.lisp b/contrib/sb-simple-streams/file.lisp index 823d321..5602b28 100644 --- a/contrib/sb-simple-streams/file.lisp +++ b/contrib/sb-simple-streams/file.lisp @@ -285,6 +285,6 @@ (let ((pathname (getf options :filename))) (with-stream-class (probe-simple-stream stream) (add-stream-instance-flags stream :simple) - (when (sb-unix:unix-access (file-namestring pathname) sb-unix:f_ok) + (when (sb-unix:unix-access (%file-namestring pathname) sb-unix:f_ok) (setf (sm pathname stream) pathname) t)))) diff --git a/contrib/sb-simple-streams/impl.lisp b/contrib/sb-simple-streams/impl.lisp index 3512edf..1367ae3 100644 --- a/contrib/sb-simple-streams/impl.lisp +++ b/contrib/sb-simple-streams/impl.lisp @@ -126,7 +126,7 @@ (if (typep stream 'file-simple-stream) (with-stream-class (file-simple-stream stream) (setf (sm pathname stream) new-name) - (setf (sm filename stream) (file-namestring new-name)) + (setf (sm filename stream) (%file-namestring new-name)) t) nil)) @@ -1103,7 +1103,7 @@ is supported only on simple-streams." (cond (new-name (setf (sb-impl::fd-stream-pathname stream) new-name) (setf (sb-impl::fd-stream-file stream) - (file-namestring new-name)) + (%file-namestring new-name)) t) (t (sb-impl::fd-stream-pathname stream)))))) diff --git a/contrib/sb-simple-streams/iodefs.lisp b/contrib/sb-simple-streams/iodefs.lisp index 6925e3d..cb006ff 100644 --- a/contrib/sb-simple-streams/iodefs.lisp +++ b/contrib/sb-simple-streams/iodefs.lisp @@ -14,7 +14,7 @@ (in-package "SB-SIMPLE-STREAMS") -(defun file-namestring (pathname) +(defun %file-namestring (pathname) (sb-ext:native-namestring (sb-int:physicalize-pathname pathname) :as-file t)) (defmacro def-stream-class (name superclasses slots &rest options)