[Openmcl-devel] Regression in pathname-device in 1.3
Daniel Dickison
danieldickison at gmail.com
Thu Feb 12 14:17:00 PST 2009
I just switched from 1.2 to the 1.3 RC, and it looks like
PATHNAME-DEVICE now errs when called with a file that was opened with
a namestring. In 1.2, this would return NIL instead.
Below is a comparison of 1.2 and 1.3 behavior, as well as a trivial
patch to restore the 1.2 behavior. However, perhaps the correct fix
is to parse the string in case it's a Windows namestring that contains
a valid device specifier.
Let me know if I should open a ticket on Trac. And as always, thank
you for your great work on CCL!
[/Applications/Lisp]$ ./ccl-1.2/dppccl --no-init
Welcome to Clozure Common Lisp Version 1.2-r11710M (DarwinPPC32)!
? (with-open-file (f "~/.profile") (pathname-device f))
NIL
? (quit)
[/Applications/Lisp]$ ./ccl-1.3/dppccl --no-init
Welcome to Clozure Common Lisp Version 1.3-RC1-r11719M (DarwinPPC32)!
? (with-open-file (f "~/.profile") (pathname-device f))
> Error: value "/Users/ddickison/.profile" is not of the expected type (OR LOGICAL-PATHNAME PATHNAME).
> While executing: PATHNAME-DEVICE, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
(F019ABB0) : 0 (PATHNAME-DEVICE #<BASIC-FILE-CHARACTER-INPUT-STREAM
("/Users/ddickison/.profile"/4 ISO-8859-1) #x84EA266> :CASE NIL) 136
(F019ABD0) : 2 (FUNCALL #'#<Anonymous Function #x84EB26E>) 172
(F019AC00) : 4 (TOPLEVEL-EVAL (WITH-OPEN-FILE (F "~/.profile")
(PATHNAME-DEVICE F)) NIL) 476
(F019AC30) : 5 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to
*TERMINAL-IO* #x84DE2FE> :OUTPUT-STREAM #<SYNONYM-STREAM to
*TERMINAL-IO* #x84DE166> :BREAK-LEVEL 0 :PROMPT-FUNCTION
#<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global)
#x81A7596>) 1080
(F019AC70) : 6 (TOPLEVEL-LOOP) 72
(F019AC90) : 7 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION
(CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 68
(F019ACB0) : 9 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 392
(F019ACE0) : 11 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1)
[Active] #x84DC58E> (#<COMPILED-LEXICAL-CLOSURE # #x84DC29E>)) 404
(F019AD20) : 13 (FUNCALL #'#<(:INTERNAL
CCL::%PROCESS-PRESET-INTERNAL)> #<TTY-LISTENER listener(1) [Active]
#x84DC58E> (#<COMPILED-LEXICAL-CLOSURE # #x84DC29E>)) 164
(F019AD40) : 14 (FUNCALL #'#<(:INTERNAL
CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 176
1 > (quit)
Index: level-1/l1-files.lisp
===================================================================
--- level-1/l1-files.lisp (revision 11731)
+++ level-1/l1-files.lisp (working copy)
@@ -776,7 +776,7 @@
(declare (ignore case))
(let* ((p (pathname thing)))
(etypecase p
- (logical-pathname :unspecific)
+ ((or logical-pathname string) :unspecific)
(pathname (%physical-pathname-device p)))))
More information about the Openmcl-devel
mailing list