tokyo.abstractdb: Renamed vocab, refactored memory streams to tokyo.utils vocab

Bruno Deferrari 2009-06-17 20:23:39 -03:00
parent 73e774cbac
commit 55f466402a
6 changed files with 15 additions and 11 deletions

View File

@ -1,20 +1,12 @@
! Copyright (C) 2009 Bruno Deferrari
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types arrays assocs destructors
io io.streams.memory kernel libc locals
sequences serialize tokyo.alien.tcadb tokyo.alien.tcutil vectors ;
IN: tokyo.cabinet.abstract
kernel locals sequences serialize vectors
tokyo.alien.tcadb tokyo.alien.tcutil tokyo.utils ;
IN: tokyo.abstractdb
TUPLE: tokyo-abstractdb handle disposed ;
<PRIVATE
: with-memory-reader ( memory quot -- )
[ <memory-stream> ] dip with-input-stream* ; inline
: memory>object ( memory -- object )
[ deserialize ] with-memory-reader ;
PRIVATE>
INSTANCE: tokyo-abstractdb assoc
: <tokyo-abstractdb> ( name -- tokyo-abstractdb )

View File

@ -0,0 +1 @@
Bruno Deferrari

View File

@ -0,0 +1 @@
Some utility words used by the tokyo vocabs

View File

@ -0,0 +1,10 @@
! Copyright (C) 2009 Bruno Deferrari
! See http://factorcode.org/license.txt for BSD license.
USING: io io.streams.memory serialize kernel ;
IN: tokyo.utils
: with-memory-reader ( memory quot -- )
[ <memory-stream> ] dip with-input-stream* ; inline
: memory>object ( memory -- object )
[ deserialize ] with-memory-reader ;