Changeset 6032


Ignore:
Timestamp:
02/28/04 15:46:35 (17 years ago)
Author:
piso
Message:

Call READ-8-BITS directly if element type is (UNSIGNED-BYTE 8).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/read-sequence.lisp

    r5511 r6032  
    22;;;
    33;;; Copyright (C) 2004 Peter Graves
    4 ;;; $Id: read-sequence.lisp,v 1.1 2004-01-20 00:18:08 piso Exp $
     4;;; $Id: read-sequence.lisp,v 1.2 2004-02-28 15:46:35 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2626      (setf end (length sequence)))
    2727  (let* ((element-type (stream-element-type stream))
    28          (read-function (if (eq element-type 'character)
    29                             #'read-char
    30                             #'read-byte)))
     28         (read-function (cond ((eq element-type 'character)
     29                               #'read-char)
     30                              ((equal element-type '(unsigned-byte 8))
     31                               #'read-8-bits)
     32                              (t
     33                               #'read-byte))))
    3134    (do ((pos start (1+ pos)))
    3235        ((>= pos end) pos)
Note: See TracChangeset for help on using the changeset viewer.