]> gitweb.factorcode.org Git - factor.git/blob - extra/alien/cxx/scaffold/scaffold.factor
factor: trim using lists
[factor.git] / extra / alien / cxx / scaffold / scaffold.factor
1 ! Copyright (C) 2010 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.cxx.demangle assocs combinators io.pathnames
4 kernel macho sequences ;
5 IN: alien.cxx.scaffold
6
7 : library-symbols ( file -- symbols )
8     dup file-extension {
9         { "dylib" [ dylib-exports ] }
10         { f       [ dylib-exports ] }
11     } case ;
12
13 : c++-library-symbols ( file abi -- symbols )
14     [ library-symbols ] dip
15     [ '[ _ c++-symbol? ] filter ]
16     [ '[ dup _ demangle ] H{ } map>assoc ] bi ;