CMUCL commit: src/code (stream.lisp)

Raymond Toy rtoy at common-lisp.net
Tue Aug 10 00:45:15 CEST 2010


    Date: Monday, August 9, 2010 @ 18:45:15
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/code

Modified: stream.lisp

FILE-POSITION returned the wrong thing for Unicode.  The
LISP-STREAM-MISC function takes care of computing the position, so
FILE-POSITION doesn't need to do anything else.  (Why isn't this true
for the non-unicode case?  Should we make it so?) 


-------------+
 stream.lisp |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)


Index: src/code/stream.lisp
diff -u src/code/stream.lisp:1.94 src/code/stream.lisp:1.95
--- src/code/stream.lisp:1.94	Sun Jul  4 23:40:02 2010
+++ src/code/stream.lisp	Mon Aug  9 18:45:14 2010
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /project/cmucl/cvsroot/src/code/stream.lisp,v 1.94 2010-07-05 03:40:02 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/code/stream.lisp,v 1.95 2010-08-09 22:45:14 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -364,8 +364,13 @@
       (t
        (let ((res (funcall (lisp-stream-misc stream) stream
 			   :file-position nil)))
+	 ;; For Unicode, the LISP-STREAM-MISC function handles
+	 ;; everything, so we can just return the result.
+	 #-unicode
 	 (when res
-	   (- res (- in-buffer-length (lisp-stream-in-index stream)))))))))
+	   (- res (- in-buffer-length (lisp-stream-in-index stream))))
+	 #+unicode
+	 res)))))
 
 
 ;;; File-Length  --  Public



More information about the cmucl-commit mailing list