Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv25376
Modified Files: typep.lisp Log Message: Fixed labels/flet confusion in coerce.
Date: Sun Aug 14 14:26:10 2005 Author: ffjeld
Index: movitz/losp/muerte/typep.lisp diff -u movitz/losp/muerte/typep.lisp:1.46 movitz/losp/muerte/typep.lisp:1.47 --- movitz/losp/muerte/typep.lisp:1.46 Sun Aug 14 14:04:05 2005 +++ movitz/losp/muerte/typep.lisp Sun Aug 14 14:26:10 2005 @@ -9,7 +9,7 @@ ;;;; Created at: Fri Dec 8 11:07:53 2000 ;;;; Distribution: See the accompanying file COPYING. ;;;; -;;;; $Id: typep.lisp,v 1.46 2005/08/14 12:04:05 ffjeld Exp $ +;;;; $Id: typep.lisp,v 1.47 2005/08/14 12:26:10 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -697,22 +697,23 @@
(defun coerce (object result-type) "=> result" - (flet ((c (object result-type actual-type) - (cond - ((typep object result-type) - object) - ((member result-type '(list array vector)) - (map result-type #'identity object)) - ((and (consp result-type) - (eq (car result-type) 'vector)) - (let* ((p (cdr result-type)) - (et (if p (pop p) t)) - (size (if p (pop p) nil))) - (make-array (or size (length object)) - :initial-contents object - :element-type et))) - ((not (eq nil result-type)) - (c object (expand-type result-type) actual-type)) - (t (error "Don't know how to coerce ~S to ~S." object actual-type))))) + (labels + ((c (object result-type actual-type) + (cond + ((typep object result-type) + object) + ((member result-type '(list array vector)) + (map result-type #'identity object)) + ((and (consp result-type) + (eq (car result-type) 'vector)) + (let* ((p (cdr result-type)) + (et (if p (pop p) t)) + (size (if p (pop p) nil))) + (make-array (or size (length object)) + :initial-contents object + :element-type et))) + ((not (eq nil result-type)) + (c object (expand-type result-type) actual-type)) + (t (error "Don't know how to coerce ~S to ~S." object actual-type))))) (c object result-type result-type)))