clean up forwarding stream-read-partial-unsafe

Now that "io" provides a method on object for stream-read-partial-unsafe that forwards to stream-read-unsafe, individual stream class that don't implement partial reads don't need to provide such a method themselves.
db4
Joe Groff 2011-10-13 19:03:15 -07:00
parent 805b0372da
commit 09f55f82fa
6 changed files with 0 additions and 9 deletions

View File

@ -98,7 +98,6 @@ M:: memory-stream stream-read-unsafe ( n buf stream -- count )
buf src n memcpy
n src <displaced-alien> stream alien<<
n ; inline
M: memory-stream stream-read-partial-unsafe stream-read-unsafe ; inline
M: value-type c-type-rep drop int-rep ;

View File

@ -10,7 +10,6 @@ IN: io.streams.string
TUPLE: string-reader { underlying string read-only } { i array-capacity } ;
M: string-reader stream-element-type drop +character+ ;
M: string-reader stream-read-partial-unsafe sequence-read-unsafe ;
M: string-reader stream-read-unsafe sequence-read-unsafe ;
M: string-reader stream-read1 sequence-read1 ;
M: string-reader stream-read-until sequence-read-until ;

View File

@ -99,8 +99,6 @@ M: decoder stream-read-unsafe ( n buf decoder -- count )
] [ 2drop 2drop 0 ] if*
] if ; inline
M: decoder stream-read-partial-unsafe stream-read-unsafe ; inline
: line-ends/eof ( stream str -- str ) f like swap cr- ; inline
: line-ends\r ( stream str -- str ) swap cr+ ; inline

View File

@ -18,7 +18,6 @@ TUPLE: byte-reader { underlying byte-array read-only } { i array-capacity } ;
M: byte-reader stream-element-type drop +byte+ ;
M: byte-reader stream-read-partial-unsafe sequence-read-unsafe ;
M: byte-reader stream-read-unsafe sequence-read-unsafe ;
M: byte-reader stream-read1 sequence-read1 ;
M: byte-reader stream-read-until sequence-read-until ;

View File

@ -47,8 +47,6 @@ M: c-reader stream-element-type drop +byte+ ;
M: c-reader stream-read-unsafe dup check-disposed handle>> fread-unsafe ;
M: c-reader stream-read-partial-unsafe stream-read-unsafe ;
M: c-reader stream-read1 dup check-disposed handle>> fgetc ;
: read-until-loop ( stream delim -- ch )

View File

@ -52,8 +52,6 @@ M:: peek-stream stream-read-unsafe ( n buf stream -- count )
] if
] if ;
M: peek-stream stream-read-partial-unsafe stream-read-unsafe ;
: peek-stream-read-until ( stream seps buf -- stream seps buf sep/f )
3dup [ [ stream-read1 dup ] dip member-eq? ] dip swap
[ drop ] [ over [ push peek-stream-read-until ] [ drop ] if ] if ;