removed trash / reformatted some lines
parent
286026d5d5
commit
62846be4f6
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue