Changeset 5066


Ignore:
Timestamp:
Sep 2, 2006, 10:00:15 AM (18 years ago)
Author:
Gary Byers
Message:

Try to avoid things like %COPY-IVECTOR-TO-IVECTOR when strings are
involved.

File:
1 edited

Legend:

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

    r5051 r5066  
    762762                 (setq col 0)
    763763                 (incf col))
    764                (setf (schar buffer i) ch)))
     764               (setf (aref buffer i) (%char-code ch))))
    765765           (setf (ioblock-dirty ioblock) t)
    766766           (incf index written)
     
    874874                            (%extend-vector
    875875                             0 string (the fixnum (+ len more)))))
    876                     (%copy-ivector-to-ivector
     876                    (%copy-u8-to-string
    877877                     buf idx string len more)
    878878                    (return (values string nil))))
     
    883883                      string (%extend-vector
    884884                              0 string (the fixnum (+ len more))))
    885                 (%copy-ivector-to-ivector
     885                (%copy-u8-to-string
    886886                 buf idx string len more)
    887887                (incf len more))))))))
     
    907907          (if (> avail need)
    908908            (setq avail need))
    909           (%copy-ivector-to-ivector inbuf idx vector i avail)
     909          (%copy-u8-to-string inbuf idx vector i avail)
    910910          (setf (io-buffer-idx in) (+ idx avail))
    911911          (incf i avail)
     
    15001500    (gvector :basic-stream class 0 nil nil)))
    15011501
    1502 (defmethod initialize-basic-stream ((s basic-stream) &key &allow-other-keys)
    1503   )
     1502(defmethod initialize-basic-stream ((s basic-stream) &key element-type &allow-other-keys)
     1503  (setf (getf (basic-stream.info s) :element-type) element-type))
    15041504
    15051505(defmethod initialize-basic-stream :after  ((s basic-input-stream) &key &allow-other-keys)
     
    22112211  (let* ((ioblock (stream-ioblock s nil)))
    22122212    (and ioblock (ioblock-device ioblock))))
     2213
     2214(defmethod stream-device ((s basic-stream) direction)
     2215  (declare (ignore direction))
     2216  (let* ((ioblock (basic-stream.state s)))
     2217    (and ioblock (ioblock-device ioblock))))
    22132218 
    22142219(defmethod stream-element-type ((s buffered-stream-mixin))
    22152220  (%buffered-stream-element-type s))
    22162221
     2222(defmethod stream-element-type ((s basic-stream))
     2223  (getf (basic-stream.info s) :element-type))
     2224
     2225
    22172226(defmethod stream-create-ioblock ((stream buffered-stream-mixin) &rest args &key)
    22182227  (declare (dynamic-extent args))
     
    22242233(defmethod stream-owner ((stream buffered-stream-mixin))
    22252234  (let* ((ioblock (stream-ioblock stream nil)))
     2235    (and ioblock (ioblock-owner ioblock))))
     2236
     2237(defmethod stream-owner ((stream basic-stream))
     2238  (let* ((ioblock (basic-stream.state stream)))
    22262239    (and ioblock (ioblock-owner ioblock))))
    22272240
Note: See TracChangeset for help on using the changeset viewer.