X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Ffunctions.lisp;h=5210f0a22a2ec41a8e51839ee85b9fff8a19a212;hb=c6c305a69913c148753813cc057be7127017ae6a;hp=927365da1a8518daa13afca5a47530a64966af72;hpb=054eef05bc69478566de63cc3bfb19ce411179c4;p=uffi.git diff --git a/src/functions.lisp b/src/functions.lisp index 927365d..5210f0a 100644 --- a/src/functions.lisp +++ b/src/functions.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: functions.lisp,v 1.2 2002/10/01 17:05:29 kevin Exp $ +;;;; $Id: functions.lisp,v 1.3 2002/10/14 01:51:15 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -21,12 +21,12 @@ (defun process-function-args (args) (if (null args) - #+(or lispworks cmu cormanlisp (and mcl (not openmcl))) nil + #+(or lispworks cmu sbcl cormanlisp (and mcl (not openmcl))) nil #+allegro '(:void) #+mcl (values nil nil) ;; args not null - #+(or lispworks allegro cmu (and mcl (not openmcl)) cormanlisp) + #+(or lispworks allegro cmu sbcl (and mcl (not openmcl)) cormanlisp) (let (processed) (dolist (arg args) (push (process-one-function-arg arg) processed)) @@ -49,7 +49,7 @@ (defun process-one-function-arg (arg) (let ((name (car arg)) (type (convert-from-uffi-type (cadr arg) :routine))) - #+cmu + #+(or cmu sbcl) (list name type :in) #+(or allegro lispworks (and mcl (not openmcl))) (if (and (listp type) (listp (car type))) @@ -66,7 +66,7 @@ ;; name is either a string representing foreign name, or a list ;; of foreign-name as a string and lisp name as a symbol (defmacro def-function (names args &key module returning) - #+(or cmu allegro mcl cormanlisp) (declare (ignore module)) + #+(or cmu sbcl allegro mcl cormanlisp) (declare (ignore module)) (let* ((result-type (convert-from-uffi-type returning :return)) (function-args (process-function-args args)) @@ -84,6 +84,10 @@ `(alien:def-alien-routine (,foreign-name ,lisp-name) ,result-type ,@function-args) + #+sbcl + `(sb-alien:def-alien-routine (,foreign-name ,lisp-name) + ,result-type + ,@function-args) #+lispworks `(fli:define-foreign-function (,lisp-name ,foreign-name :source) ,function-args