alien.libraries: dlopen should handle resource:-paths
parent
d05363e1e8
commit
ab7494eef9
|
@ -1,4 +1,10 @@
|
|||
USING: alien alien.libraries alien.syntax tools.test kernel ;
|
||||
USING:
|
||||
alien alien.libraries alien.syntax
|
||||
formatting
|
||||
io.pathnames
|
||||
kernel
|
||||
system
|
||||
tools.test ;
|
||||
IN: alien.libraries.tests
|
||||
|
||||
[ f ] [ DLL" fadfasdfsada" dll-valid? ] unit-test
|
||||
|
@ -26,3 +32,10 @@ IN: alien.libraries.tests
|
|||
"test-library" "blah" cdecl add-library?
|
||||
"blah" remove-library
|
||||
] unit-test
|
||||
|
||||
! dlopen resolves resource:-paths
|
||||
os windows? [
|
||||
[ t ] [
|
||||
vm file-stem "resource:/%s.exe" sprintf dlopen dll-valid?
|
||||
] unit-test
|
||||
] when
|
||||
|
|
|
@ -5,7 +5,7 @@ kernel namespaces destructors sequences strings
|
|||
system io.pathnames fry combinators vocabs ;
|
||||
IN: alien.libraries
|
||||
|
||||
: dlopen ( path -- dll ) native-string>alien (dlopen) ;
|
||||
: dlopen ( path -- dll ) absolute-path native-string>alien (dlopen) ;
|
||||
|
||||
: dlsym ( name dll -- alien ) [ string>symbol ] dip (dlsym) ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue