r1542: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 10 Mar 2002 20:01:55 +0000 (20:01 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 10 Mar 2002 20:01:55 +0000 (20:01 +0000)
doc/ref.sgml
examples/compress.cl
src/libraries.cl
tests/compress.cl

index 6f21f33f6b728055271690ec0b2ef8d58caddc46..93a63f1f24621d31bbca8ce3d31ab4ebca72df98 100644 (file)
@@ -419,7 +419,7 @@ foreign function.
       <refsect1>
        <title>Syntax</title>
 <synopsis>
-         <function>load-foreign-library</function> <replaceable>filename module supporting-libraries</replaceable> => <returnvalue>success</returnvalue>
+         <function>load-foreign-library</function> <replaceable>filename &amp;key module supporting-libraries</replaceable> => <returnvalue>success</returnvalue>
 </synopsis>
       </refsect1>
       <refsect1>
@@ -429,7 +429,8 @@ foreign function.
            <term><parameter>filename</parameter></term>
            <listitem>
              <para>A string or pathname specifying the library location
-in the filesystem.
+in the filesystem. At least one implementation (&lw;) can not
+accept a logical pathname.
              </para>
            </listitem>
          </varlistentry>
index 4cb184f6299239d0240ac1b743329a9710f05960..3b41eb9b6b3efcf3f57163811501007d674c6eb0 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: compress.cl,v 1.5 2002/03/10 11:13:07 kevin Exp $
+;;;; $Id: compress.cl,v 1.6 2002/03/10 20:01:55 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -29,7 +29,9 @@
 
 (in-package :cl-user)
 
-(unless (uffi:load-foreign-library "/usr/lib/libz.so" "zlib" '("c"))
+(unless (uffi:load-foreign-library "/usr/lib/libz.so" 
+                                  :module "zlib" 
+                                  :supporting-libraries '("c"))
   (warn "Unable to load zlib"))
 
 (uffi:def-function ("compress" c-compress)
index 21867d1d70d18054cef968c3c0930966e4738d18..b9bc2a53759983d323c425b0e1ad756526e4c50f 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: libraries.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: libraries.cl,v 1.2 2002/03/10 20:01:55 kevin Exp $
 ;;;;
 ;;;; This file is part of the UFFI. 
 ;;;;
@@ -33,7 +33,7 @@
 (defvar *loaded-libraries* nil
   "List of foreign libraries loaded. Used to prevent reloading a library")
 
-(defun load-foreign-library (filename module supporting-libraries)
+(defun load-foreign-library (filename &key module supporting-libraries)
   #+allegro (declare (ignore module supporting-libraries))
   #+lispworks  (declare (ignore supporting-libraries))
   #+cmu (declare (ignore module))
@@ -46,7 +46,8 @@
                                  :libraries
                                  (convert-supporting-libraries-to-string
                                   supporting-libraries))
-       #+lispworks (fli:register-module module :connection-style :automatic 
+       #+lispworks (fli:register-module module 
+                                        :connection-style :automatic 
                                         :real-name filename)
        #+allegro (load filename)
        
index 4cb184f6299239d0240ac1b743329a9710f05960..3b41eb9b6b3efcf3f57163811501007d674c6eb0 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: compress.cl,v 1.5 2002/03/10 11:13:07 kevin Exp $
+;;;; $Id: compress.cl,v 1.6 2002/03/10 20:01:55 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -29,7 +29,9 @@
 
 (in-package :cl-user)
 
-(unless (uffi:load-foreign-library "/usr/lib/libz.so" "zlib" '("c"))
+(unless (uffi:load-foreign-library "/usr/lib/libz.so" 
+                                  :module "zlib" 
+                                  :supporting-libraries '("c"))
   (warn "Unable to load zlib"))
 
 (uffi:def-function ("compress" c-compress)