Changeset 11627


Ignore:
Timestamp:
Jan 19, 2009, 7:54:15 PM (11 years ago)
Author:
gb
Message:

Make an ioblock's unread-char function selectable (based on stream class.)

File:
1 edited

Legend:

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

    r11546 r11627  
    19401940        (incf col))
    19411941      (if (< code limit)
    1942                (%ioblock-write-u8-element ioblock code)
    1943                (funcall encode-function char #'%ioblock-write-u8-element ioblock)))))
     1942        (%ioblock-write-u8-element ioblock code)
     1943        (funcall encode-function char #'%ioblock-write-u8-element ioblock)))))
    19441944
    19451945
     
    26792679  (setf (ioblock-sharing ioblock) sharing)
    26802680  (when character-p
    2681     (setf (ioblock-unread-char-function ioblock) '%ioblock-untyi)
     2681    (setf (ioblock-unread-char-function ioblock) (select-stream-untyi-function (ioblock-stream ioblock) :input))
    26822682    (setf (ioblock-decode-literal-code-unit-limit ioblock)
    26832683          (if encoding
     
    59825982
    59835983
     5984(defmethod select-stream-untyi-function ((s symbol) direction)
     5985  (select-stream-untyi-function (find-class s) direction))
     5986
     5987(defmethod select-stream-untyi-function ((c class) direction)
     5988  (select-stream-untyi-function (class-prototype c) direction))
     5989
     5990(defmethod select-stream-untyi-function ((s fd-stream) (direction t))
     5991  '%ioblock-untyi)
     5992
     5993(defmethod select-stream-untyi-function ((s basic-stream) (direction t))
     5994  '%ioblock-untyi)
    59845995
    59855996; end of L1-streams.lisp
Note: See TracChangeset for help on using the changeset viewer.