From 12db5cd09b33b58b762a505a80cdde5ab5984cd0 Mon Sep 17 00:00:00 2001 From: Liam Healy <liam@thinkpad.local> Date: Sun, 28 Mar 2010 16:47:44 -0400 Subject: [PATCH] Extract c-pointer of interpolation arrays xa, ya before passing Extract c-pointer of interpolation arrays xa, ya before passing, instead of trying to pass the CL object directly to GSL. Fixes error http://common-lisp.net/pipermail/gsll-devel/2010q1/000437.html reported by Mirko Vukovic. --- interpolation/evaluation.lisp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/interpolation/evaluation.lisp b/interpolation/evaluation.lisp index 728ddefa..fb1e57f0 100644 --- a/interpolation/evaluation.lisp +++ b/interpolation/evaluation.lisp @@ -1,6 +1,6 @@ ;; Evaluation of interpolation functions. ;; Liam Healy Sun Nov 4 2007 - 18:40 -;; Time-stamp: <2009-12-27 09:52:14EST evaluation.lisp> +;; Time-stamp: <2010-03-28 16:40:16EDT evaluation.lisp> ;; ;; Copyright 2007, 2008, 2009 Liam M. Healy ;; Distributed under the terms of the GNU General Public License @@ -20,11 +20,16 @@ (in-package :gsl) +;;; /usr/include/gsl/gsl_interp.h + (defmfun evaluate ((interpolation interpolation) x &key xa ya (acceleration (make-acceleration))) "gsl_interp_eval" - (((mpointer interpolation) :pointer) (xa :pointer) (ya :pointer) (x :double) + (((mpointer interpolation) :pointer) + ((c-pointer xa) :pointer) + ((c-pointer ya) :pointer) + (x :double) ((mpointer acceleration) :pointer)) :definition :method :inputs (xa ya) @@ -45,7 +50,10 @@ ((interpolation interpolation) x &key xa ya (acceleration (make-acceleration))) "gsl_interp_eval_deriv" - (((mpointer interpolation) :pointer) (xa :pointer) (ya :pointer) (x :double) + (((mpointer interpolation) :pointer) + ((c-pointer xa) :pointer) + ((c-pointer ya) :pointer) + (x :double) ((mpointer acceleration) :pointer)) :definition :method :inputs (xa ya) @@ -61,7 +69,10 @@ (defmfun evaluate-second-derivative ((interpolation interpolation) x &key xa ya (acceleration (make-acceleration))) "gsl_interp_eval_deriv2" - (((mpointer interpolation) :pointer) (xa :pointer) (ya :pointer) (x :double) + (((mpointer interpolation) :pointer) + ((c-pointer xa) :pointer) + ((c-pointer ya) :pointer) + (x :double) ((mpointer acceleration) :pointer)) :definition :method :inputs (xa ya) @@ -78,7 +89,9 @@ ((interpolation interpolation) low high &key xa ya (acceleration (make-acceleration))) "gsl_interp_eval_integ" - (((mpointer interpolation) :pointer) (xa :pointer) (ya :pointer) + (((mpointer interpolation) :pointer) + ((c-pointer xa) :pointer) + ((c-pointer ya) :pointer) (low :double) (high :double) ((mpointer acceleration) :pointer)) :definition :method :inputs (xa ya) -- GitLab