Skip to content

Improve generic version of PATHNAME

Tarn Burton requested to merge yitzchak/cmucl:gray-ext into master

My previous attempt to make PATHNAME generic in the gray-streams module was apparently not sufficient. cl:close explicitly states that functions like PATHNAME-NAME should also work on closed streams. This did not work because the type path-designator was (or string pathname file-stream). In order to make the generic PATHNAME work and be called by PATHNAME-NAME, etc I had to change the path-designator type to (or string pathname stream). This isn't technically correct according to the ANSI spec, but all the tests should still pass because PATHNAME has an ETYPECASE that will fall through for non file-stream.

Also, I've made with-pathname do (pathname thing). This guarantees that it will call the generic function once it is installed.

Edited by Tarn Burton

Merge request reports