Changeset 9951


Ignore:
Timestamp:
Jul 10, 2008, 9:07:06 AM (11 years ago)
Author:
gb
Message:

READ-CHAR defined in terms of fixed-arg, inlined READ-CHAR-INTERNAL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lib/streams.lisp

    r6205 r9951  
    5151        (values string nil)))))
    5252
     53
     54(eval-when (:compile-toplevel)
     55  (declaim (inline read-char-internal)))
     56
     57(defun read-char-internal (input-stream eof-error-p eof-value)
     58  (declare (optimize (speed 3) (space 0)))
     59  (check-eof
     60   (if (or (typep input-stream 'basic-stream)
     61           (typep (setq input-stream (designated-input-stream input-stream))
     62                  'basic-stream))
     63     (let* ((ioblock (basic-stream-ioblock input-stream)))
     64       (funcall (ioblock-read-char-function ioblock) ioblock))
     65     (stream-read-char input-stream))
     66   input-stream eof-error-p eof-value))
     67
    5368(defun read-char (&optional input-stream (eof-error-p t) eof-value recursive-p)
    54   (declare (ignore recursive-p)
    55            (optimize (speed 3) (space 0)))
    56   (setq input-stream (designated-input-stream input-stream))
    57   (if (typep input-stream 'basic-stream)
    58     (let* ((ioblock (basic-stream-ioblock input-stream)))
    59       (check-eof
    60        (funcall (ioblock-read-char-function ioblock) ioblock)
    61        input-stream eof-error-p eof-value))
    62     (check-eof (stream-read-char input-stream)
    63                input-stream
    64                eof-error-p
    65                eof-value)))
     69  (declare (ignore recursive-p))
     70  (read-char-internal input-stream eof-error-p eof-value))
    6671
    6772(defun unread-char (char &optional input-stream)
Note: See TracChangeset for help on using the changeset viewer.