Changeset 14833


Ignore:
Timestamp:
Jun 21, 2011, 9:17:23 AM (8 years ago)
Author:
gb
Message:

Writing octet sequences to vector output streams grows the buffer, so
account for that in %IOBLOCK-BINARY-STREAM-WRITE-VECTOR.

Fixes ticket:870 in the trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-streams.lisp

    r14820 r14833  
    52395239(defun %ioblock-binary-stream-write-vector (ioblock vector start end)
    52405240  (declare (fixnum start end))
     5241  (declare (optimize (safety 3)))
    52415242  (let* ((out (ioblock-outbuf ioblock))
    5242          (buf (io-buffer-buffer out))
    52435243         (written 0)
    5244          (limit (io-buffer-limit out))
    52455244         (total (- end start))
    5246          (buftype (typecode buf)))
    5247     (declare (fixnum buftype written total limit))
     5245         (buftype (typecode (io-buffer-buffer out))))
     5246    (declare (fixnum buftype written total))
    52485247    (if (not (= (the fixnum (typecode vector)) buftype))
    52495248      (if (typep vector 'string)
     
    52685267        (let* ((index (io-buffer-idx out))
    52695268               (count (io-buffer-count out))
     5269               (limit (io-buffer-limit out))
     5270               (buf (io-buffer-buffer out))
    52705271               (avail (- limit index)))
    5271           (declare (fixnum index avail count))
     5272          (declare (fixnum index avail count limit))
    52725273          (cond
    52735274            ((= (setq written avail) 0)
Note: See TracChangeset for help on using the changeset viewer.