removed trash / reformatted some lines

db4
Sascha Matzke 2009-05-01 16:23:06 +02:00
parent 286026d5d5
commit 62846be4f6
1 changed files with 3 additions and 7 deletions

View File

@ -6,11 +6,8 @@ io.encodings.utf8 io.streams.byte-array kernel math math.parser
namespaces quotations sequences sequences.private serialize strings namespaces quotations sequences sequences.private serialize strings
words combinators.short-circuit literals ; words combinators.short-circuit literals ;
IN: bson.writer IN: bson.writer
#! Writes the object out to a byte-vector in BSON format
<PRIVATE <PRIVATE
SYMBOL: shared-buffer SYMBOL: shared-buffer
@ -24,10 +21,9 @@ CONSTANT: INT64-SIZE 8
[ 8192 <byte-vector> [ shared-buffer set ] keep ] unless* ; inline [ 8192 <byte-vector> [ shared-buffer set ] keep ] unless* ; inline
: >le-stream ( x n -- ) : >le-stream ( x n -- )
! >le write swap
swap '[ _ swap nth-byte 0 B{ 0 } '[ _ swap nth-byte 0 B{ 0 }
[ set-nth-unsafe ] keep write ] each [ set-nth-unsafe ] keep write ] each ; inline
; inline
PRIVATE> PRIVATE>