forestdb.lib: iterator needs to call free on docs.
parent
2f2cd7b299
commit
24c6bbc2a8
|
@ -259,9 +259,11 @@ T{ doc
|
||||||
dup length fdb_iterator_seek fdb-check-error ;
|
dup length fdb_iterator_seek fdb-check-error ;
|
||||||
|
|
||||||
: with-fdb-iterator ( start-key end-key fdb_iterator_opt_t iterator-init iterator-next quot: ( obj -- ) -- )
|
: with-fdb-iterator ( start-key end-key fdb_iterator_opt_t iterator-init iterator-next quot: ( obj -- ) -- )
|
||||||
[ '[ _ _ _ _ execute ] call ] 2dip pick '[
|
[ execute ] 2dip
|
||||||
[ _ handle>> _ execute [ [ @ ] when* ] keep ] loop
|
'[
|
||||||
_ &dispose drop
|
_ &dispose handle>> [
|
||||||
|
_ execute [ _ with-doc t ] [ f ] if*
|
||||||
|
] curry loop
|
||||||
] with-destructors ; inline
|
] with-destructors ; inline
|
||||||
|
|
||||||
: with-fdb-normal-iterator ( start-key end-key quot -- )
|
: with-fdb-normal-iterator ( start-key end-key quot -- )
|
||||||
|
|
Loading…
Reference in New Issue