From f820215b1e2ceb76bf23a1d1a859115985536a22 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 23 Mar 2013 17:16:46 -0700 Subject: [PATCH] alien.libraries: Rename library to lookup-library. --- basis/alien/libraries/libraries.factor | 8 ++++---- basis/compiler/cfg/builder/alien/alien.factor | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/alien/libraries/libraries.factor b/basis/alien/libraries/libraries.factor index a046e3b9f5..7e8611405e 100755 --- a/basis/alien/libraries/libraries.factor +++ b/basis/alien/libraries/libraries.factor @@ -21,7 +21,7 @@ TUPLE: library { path string } { abi abi initial: cdecl } dll dlerror ; ERROR: no-library name ; -: library ( name -- library ) libraries get at ; +: lookup-library ( name -- library ) libraries get at ; : ( path abi -- library ) over dup @@ -32,7 +32,7 @@ ERROR: no-library name ; dup [ dll>> ] when ; : load-library ( name -- dll ) - library library-dll ; + lookup-library library-dll ; M: dll dispose dlclose ; @@ -42,7 +42,7 @@ M: library dispose dll>> [ dispose ] when* ; libraries get delete-at* [ dispose ] [ drop ] if ; : add-library? ( name path abi -- ? ) - [ library ] 2dip + [ lookup-library ] 2dip '[ [ path>> _ = ] [ abi>> _ = ] bi and not ] [ t ] if* ; : add-library ( name path abi -- ) @@ -52,7 +52,7 @@ M: library dispose dll>> [ dispose ] when* ; ] [ 3drop ] if ; : library-abi ( library -- abi ) - library [ abi>> ] [ cdecl ] if* ; + lookup-library [ abi>> ] [ cdecl ] if* ; ERROR: no-such-symbol name library ; diff --git a/basis/compiler/cfg/builder/alien/alien.factor b/basis/compiler/cfg/builder/alien/alien.factor index 3d2d3cc0ca..2333a64e4e 100644 --- a/basis/compiler/cfg/builder/alien/alien.factor +++ b/basis/compiler/cfg/builder/alien/alien.factor @@ -91,7 +91,7 @@ M: array dlsym-valid? '[ _ dlsym ] any? ; : caller-linkage ( params -- symbols dll ) [ dup abi>> callee-cleanup? [ decorated-symbol ] [ function>> ] if ] - [ library>> library ] + [ library>> lookup-library ] bi 2dup check-dlsym library-dll ; : caller-return ( params -- )