diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-18 22:48:38 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-18 22:48:38 +0100 |
commit | 0c1a8882f03cdaf283e4289a3d2c5d89a1c01199 (patch) | |
tree | a642e2d59547a38639647fe2b8b57cfaa8236512 /Lisp/internal-utilities.lisp | |
parent | 4fdf935d2221eb659827fe9714a19d956ecff253 (diff) |
Fix support for older versions of CFFI.
darcs-hash:2f77404ae69521fa59b974123814e7f008692d37
Diffstat (limited to 'Lisp/internal-utilities.lisp')
-rw-r--r-- | Lisp/internal-utilities.lisp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lisp/internal-utilities.lisp b/Lisp/internal-utilities.lisp index b23905f..b610096 100644 --- a/Lisp/internal-utilities.lisp +++ b/Lisp/internal-utilities.lisp @@ -87,9 +87,10 @@ ;; Compatibility with older versions of CFFI. (unless (fboundp 'foreign-funcall-pointer) (defmacro foreign-funcall-pointer (pointer options &rest args) - (if (find-symbol "FOREIGN-FUNCALL-POINTER" '#:cffi) - `(cffi:foreign-funcall-pointer ,pointer ,options ,@args) - `(cffi:foreign-funcall (,pointer ,@options) ,@args)))) + (let ((foreign-funcall-pointer-sym (find-symbol "FOREIGN-FUNCALL-POINTER" '#:cffi))) + (if foreign-funcall-pointer-sym + `(,foreign-funcall-pointer-sym ,pointer ,options ,@args) + `(cffi:foreign-funcall (,pointer ,@options) ,@args))))) ;; Caching of function values. |