From e9427febae05e5563f723f72487fc11365033d8d Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 10 Mar 2002 20:01:55 +0000 Subject: [PATCH 1/1] r1542: *** empty log message *** --- doc/ref.sgml | 5 +++-- examples/compress.cl | 6 ++++-- src/libraries.cl | 7 ++++--- tests/compress.cl | 6 ++++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/ref.sgml b/doc/ref.sgml index 6f21f33..93a63f1 100644 --- a/doc/ref.sgml +++ b/doc/ref.sgml @@ -419,7 +419,7 @@ foreign function. Syntax - load-foreign-library filename module supporting-libraries => success + load-foreign-library filename &key module supporting-libraries => success @@ -429,7 +429,8 @@ foreign function. filename 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. diff --git a/examples/compress.cl b/examples/compress.cl index 4cb184f..3b41eb9 100644 --- a/examples/compress.cl +++ b/examples/compress.cl @@ -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) diff --git a/src/libraries.cl b/src/libraries.cl index 21867d1..b9bc2a5 100644 --- a/src/libraries.cl +++ b/src/libraries.cl @@ -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) diff --git a/tests/compress.cl b/tests/compress.cl index 4cb184f..3b41eb9 100644 --- a/tests/compress.cl +++ b/tests/compress.cl @@ -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) -- 2.34.1