From 0aec8f46ed08f6a05f694bdc7445dd47919fdcd1 Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Mon, 10 Jul 2000 06:31:11 +0000 Subject: [PATCH] Correct the declared return type of parse-namestring; the second return value may be nil not just an index. --- code/pathname.lisp | 12 ++++++------ compiler/fndb.lisp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/pathname.lisp b/code/pathname.lisp index 632137aa0..2e97c0179 100644 --- a/code/pathname.lisp +++ b/code/pathname.lisp @@ -4,7 +4,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pathname.lisp,v 1.40 2000/07/06 04:37:20 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pathname.lisp,v 1.41 2000/07/10 06:31:02 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -789,8 +789,10 @@ a host-structure or string." ;;; call the parser, then check if the host matches. ;;; (defun %parse-namestring (namestr host defaults start end junk-allowed) - (declare (type (or host null) host) (type string namestr) - (type index start) (type (or index null) end)) + (declare (type string namestr) + (type (or host null) host) + (type index start) + (type (or index null) end)) (if junk-allowed (handler-case (%parse-namestring namestr host defaults start end nil) @@ -845,9 +847,7 @@ a host-structure or string." (type (or null host) host) (type pathname defaults) (type index start) - (type (or index null) end) - (type (or t null) junk-allowed) - (values (or null pathname) (or null index))) + (type (or index null) end)) (etypecase thing (simple-string (%parse-namestring thing host defaults start end junk-allowed)) diff --git a/compiler/fndb.lisp b/compiler/fndb.lisp index 8c127b9b5..0a10ccda3 100644 --- a/compiler/fndb.lisp +++ b/compiler/fndb.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/fndb.lisp,v 1.87 2000/07/09 16:08:56 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/fndb.lisp,v 1.88 2000/07/10 06:31:11 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -972,7 +972,7 @@ (defknown parse-namestring (pathnamelike &optional pathname-host pathnamelike &key (:start index) (:end sequence-end) (:junk-allowed t)) - (values (or pathname null) index) + (values (or pathname null) sequence-end) ()) (defknown merge-pathnames -- GitLab