X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/c52ab022eab14d252e153ee7518065bac543b8ff..1bf1bfc9dae1911ac64a7d1732e1912ec81700f4:/gffi/interface.lisp diff --git a/gffi/interface.lisp b/gffi/interface.lisp index 0df9387..084ed47 100644 --- a/gffi/interface.lisp +++ b/gffi/interface.lisp @@ -20,7 +20,7 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: interface.lisp,v 1.7 2007-10-17 17:04:15 espen Exp $ +;; $Id: interface.lisp,v 1.10 2008-12-10 02:40:18 espen Exp $ (in-package "GFFI") @@ -128,8 +128,15 @@ (list (cond ((and (namep expr) (not (in-arg-p style))) expr) - ((namep expr) (make-symbol (string expr))) - ((gensym))) + ((namep expr) + #-clisp(make-symbol (string expr)) + ;; The above used to work in CLISP, but I'm + ;; not sure exactly at which version it + ;; broke. The following could potentially + ;; cause variable capturing + #+clisp(intern (format nil "~A-~A" (string expr) (gensym)))) + (#-clisp(gensym) + #+clisp(intern (string (gensym))))) (or aux expr) type style out-type)))) args))) @@ -209,7 +216,8 @@ when (out-arg-p style) collect (return-type out-type) when (return-arg-p style) - collect (return-type type))))))) + collect (return-type type)))) + ,lisp-name))) (defun ,lisp-name ,lambda-list ,doc (let ,aux-bindings @@ -437,6 +445,8 @@ (error "~A can not be expanded to ~A" form type)))))) (expand form))) +(defun type-equal-p (type1 type2) + (and (subtypep type1 type2) (subtypep type2 type1))) ;;;; Type methods