CMUCL commit: src/code (fd-stream.lisp)

Raymond Toy rtoy at common-lisp.net
Mon Jan 25 14:58:01 CET 2010


    Date: Monday, January 25, 2010 @ 08:58:01
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/code

Modified: fd-stream.lisp

STRING-ENCODE has start and end indices.  Use them instead of consing
up another string. 


----------------+
 fd-stream.lisp |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


Index: src/code/fd-stream.lisp
diff -u src/code/fd-stream.lisp:1.96 src/code/fd-stream.lisp:1.97
--- src/code/fd-stream.lisp:1.96	Sat Jan 23 13:02:05 2010
+++ src/code/fd-stream.lisp	Mon Jan 25 08:58:01 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/fd-stream.lisp,v 1.96 2010-01-23 18:02:05 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/code/fd-stream.lisp,v 1.97 2010-01-25 13:58:01 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1672,11 +1672,11 @@
 		     ;; have not been already supplied, we need to
 		     ;; convert them back to the encoded format and
 		     ;; count the number of octets.
-		     (decf posn (length
-				 (string-encode (subseq (fd-stream-string-buffer stream)
-							(fd-stream-string-index stream)
-							(fd-stream-string-buffer-len stream))
-						(fd-stream-external-format stream))))
+		     (decf posn
+			   (length (string-encode (fd-stream-string-buffer stream)
+						  (fd-stream-external-format stream)
+						  (fd-stream-string-index stream)
+						  (fd-stream-string-buffer-len stream))))
 		     (decf posn (- (fd-stream-ibuf-tail stream)
 				   (fd-stream-ibuf-head stream))))
 		 (when (fd-stream-unread stream) ;;@@



More information about the cmucl-commit mailing list