1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors alien assocs io.backend kernel namespaces ;
8 libraries [ H{ } clone ] initialize
10 TUPLE: library path abi dll ;
12 : library ( name -- library ) libraries get at ;
14 : <library> ( path abi -- library )
15 over dup [ dlopen ] when \ library boa ;
17 : load-library ( name -- dll )
18 library dup [ dll>> ] when ;
20 : add-library ( name path abi -- )
21 <library> swap libraries get set-at ;