alien.libraries: allow "foo f address-of" to be folded.
parent
c3a4efdcf1
commit
96c7a59ad2
|
|
@ -56,8 +56,12 @@ M: library dispose dll>> [ dispose ] when* ;
|
||||||
|
|
||||||
ERROR: no-such-symbol name library ;
|
ERROR: no-such-symbol name library ;
|
||||||
|
|
||||||
: address-of ( name library -- value )
|
: (address-of) ( name -- value )
|
||||||
2dup load-library dlsym-raw [ 2nip ] [ no-such-symbol ] if* ;
|
dup f dlsym-raw [ nip ] [ f no-such-symbol ] if* ; foldable
|
||||||
|
|
||||||
|
: address-of ( name library/f -- value )
|
||||||
|
[ 2dup load-library dlsym-raw [ 2nip ] [ no-such-symbol ] if* ]
|
||||||
|
[ (address-of) ] if* ; inline
|
||||||
|
|
||||||
SYMBOL: deploy-libraries
|
SYMBOL: deploy-libraries
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue