diff --git a/init/body-expand.lisp b/init/body-expand.lisp index 0b53ddb4a5c1dce4b01d09f43cf0307f4b52f3fe..d1b69cf78d1eaa3821edc5c6c7a722315609e593 100644 --- a/init/body-expand.lisp +++ b/init/body-expand.lisp @@ -1,6 +1,6 @@ ;; Expand the body of a defmfun ;; Liam Healy 2009-04-13 22:07:13EDT body-expand.lisp -;; Time-stamp: <2009-04-25 23:42:34EDT body-expand.lisp> +;; Time-stamp: <2009-05-02 21:43:36EDT body-expand.lisp> ;; $Id: $ (in-package :gsl) @@ -42,33 +42,6 @@ :test 'st-symbol)) finally (return answer))) -(defmacro foreign-funcall-indirect (name-and-options &rest arguments) - "Call the foreign function through FSBV, after setting one more level of indirection." - (let* ((arguments-symbol-type - (loop for (type form) on (butlast arguments) by #'cddr - collect - (list (if (symbolp form) - (make-symbol (string form)) - (gensym "FORMARG")) - type))) - (clargs (loop for (nil form) on (butlast arguments) by #'cddr - collect form)) - (ptrlist (mapcar - (lambda (st) - (make-st (st-symbol st) - (st-type st))) - arguments-symbol-type))) - ;; Here allocate the foreign objects - `(fsbv:with-foreign-objects - ,(mapcar (lambda (st cl) - (append (make-st (st-symbol st) `',(st-type st)) - (list cl))) - ptrlist - clargs) - (fsbv:foreign-funcall - ,name-and-options - ,@(append (mappend 'reverse ptrlist) (last arguments)))))) - (defun body-expand (name arglist gsl-name c-arguments key-args) "Expand the body (computational part) of the defmfun." (with-defmfun-key-args key-args @@ -113,7 +86,7 @@ cbinfo callback-dynamic-variables callback-dynamic) (let ((,(st-symbol creturn-st) (,(if (some 'identity pbv) - 'foreign-funcall-indirect + 'fsbv:foreign-funcall 'cffi:foreign-funcall) ,gsl-name ,@(mappend diff --git a/polynomial.lisp b/polynomial.lisp index d6511efe676c7297964a892b6b49b54a70058565..8adc4df59308e4595a39d89fb288f86ffd337f41 100644 --- a/polynomial.lisp +++ b/polynomial.lisp @@ -1,6 +1,6 @@ ;; Polynomials ;; Liam Healy, Tue Mar 21 2006 - 18:33 -;; Time-stamp: <2009-04-29 22:34:47EDT polynomial.lisp> +;; Time-stamp: <2009-04-30 22:57:18EDT polynomial.lisp> ;; $Id$ (in-package :gsl) @@ -26,7 +26,6 @@ :documentation ; FDL "Evaluate the polyonomial with coefficients at the point x.") -;;; These won't work until we can take returned complex (structs). (defmfun evaluate ((coefficients vector-double-float) (x complex) &key)