Changeset 8858


Ignore:
Timestamp:
03/30/05 15:47:32 (16 years ago)
Author:
piso
Message:

Moved SYS::READ-SPECIALIZED-VECTOR-UNSIGNED-BYTE-8 to Primitives.java as SYS:READ-VECTOR-UB8.

File:
1 edited

Legend:

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

    r8853 r8858  
    22;;;
    33;;; Copyright (C) 2004-2005 Peter Graves
    4 ;;; $Id: read-sequence.lisp,v 1.3 2005-03-29 19:30:39 piso Exp $
     4;;; $Id: read-sequence.lisp,v 1.4 2005-03-30 15:47:32 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2020(in-package #:system)
    2121
    22 (defun read-specialized-vector-unsigned-byte-8 (vector stream start end)
    23   (declare (optimize speed))
    24   (declare (type '(array (unsigned-byte-8) (*)) vector))
    25   (declare (type fixnum start end))
    26   (do ((pos start (the fixnum (1+ pos))))
    27       ((>= pos end) pos)
    28     (declare (type fixnum pos))
    29     (let ((element (read-8-bits stream nil :eof)))
    30       (when (eq element :eof)
    31         (return pos))
    32       (setf (aref vector pos) element))))
    33 
    3422(defun read-sequence (sequence stream &key (start 0) end)
    3523  (require-type start '(integer 0))
     
    4836           (if (and (vectorp sequence)
    4937                    (equal (array-element-type sequence) '(unsigned-byte 8)))
    50                (read-specialized-vector-unsigned-byte-8 sequence stream start end)
     38               (read-vector-ub8 sequence stream start end)
    5139               (do ((pos start (1+ pos)))
    5240                   ((>= pos end) pos)
Note: See TracChangeset for help on using the changeset viewer.