1 ! Copyright (C) 2009 Bruno Deferrari
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien alien.c-types alien.libraries alien.syntax
4 combinators kernel system ;
8 { [ os macosx? ] [ "/opt/local/lib/libtokyocabinet.dylib" ] }
9 { [ os unix? ] [ "libtokyocabinet.so" ] }
10 { [ os windows? ] [ "tokyocabinet.dll" ] }
11 } cond "cdecl" add-library >>
21 ! FIXME: on windows 64bits this isn't correct, because long is 32bits there, and time_t is int64
22 TYPEDEF: long tokyo_time_t
24 TYPEDEF: void* TCLIST*
26 FUNCTION: TCLIST* tclistnew ( ) ;
27 FUNCTION: TCLIST* tclistnew2 ( int anum ) ;
28 FUNCTION: void tclistdel ( TCLIST* list ) ;
29 FUNCTION: int tclistnum ( TCLIST* list ) ;
30 FUNCTION: void* tclistval ( TCLIST* list, int index, int* sp ) ;
31 FUNCTION: char* tclistval2 ( TCLIST* list, int index ) ;
32 FUNCTION: void tclistpush ( TCLIST* list, void* ptr, int size ) ;
33 FUNCTION: void tclistpush2 ( TCLIST* list, char* str ) ;
34 FUNCTION: void tcfree ( void* ptr ) ;
37 TYPEDEF: void* TCCODEC
38 TYPEDEF: void* TCPDPROC