From 1086d0419d74be409fcbca2873c02b2fc10ccfea Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Mon, 25 Jan 2010 13:58:01 +0000
Subject: [PATCH] STRING-ENCODE has start and end indices.  Use them instead of
 consing up another string.

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

diff --git a/code/fd-stream.lisp b/code/fd-stream.lisp
index 2e5436f96..5faf5c98b 100644
--- a/code/fd-stream.lisp
+++ b/code/fd-stream.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/code/fd-stream.lisp,v 1.96 2010/01/23 18:02:05 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/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) ;;@@
-- 
GitLab