]> gitweb.factorcode.org Git - factor.git/commitdiff
forestdb.lib: fdb_iterator_get() actually calls create_doc and mallocs the memory...
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 11 Dec 2014 23:28:13 +0000 (15:28 -0800)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 11 Dec 2014 23:28:13 +0000 (15:28 -0800)
extra/forestdb/lib/lib.factor

index 8bc41c3b0d4ce69b42197ee0a18d1605e3af226c..a8bd595d99f5c850c24ec952e256801d9653f55e 100644 (file)
@@ -293,9 +293,10 @@ T{ doc
     } cleave <info> ;
 
 : fdb-iterator-get ( iterator -- doc/f )
-    fdb_doc malloc-struct fdb_doc <ref>
+    f void* <ref>
     [ fdb_iterator_get check-iterate-result ] keep swap
-    [ void* deref fdb_doc memory>struct ] [ void* deref free f ] if ;
+    [ void* deref fdb_doc memory>struct ]
+    [ drop f ] if ;
 
 : fdb-iterator-seek ( iterator key seek-opt -- )
     [ dup length ] dip fdb_iterator_seek fdb-check-error ;