diff --git a/gsll.asd b/gsll.asd index e423e258684d411f1abe1ea2b65ffa2dba4e29f8..c810df2eb2fd361024a64a07bac6a93fd90a8e43 100644 --- a/gsll.asd +++ b/gsll.asd @@ -3,7 +3,7 @@ ; description: Definition of GSLL system ; date: ; author: Liam Healy -; modified: Tue Mar 21 2006 - 23:10 +; modified: Fri Mar 24 2006 - 15:33 ;******************************************************** ;;; $Id: $ @@ -13,7 +13,7 @@ :version "0" :author "Liam M. Healy" :licence "GPL" - :depends-on (cffi) + :depends-on (cffi cffi-unix) ; http://www.cliki.net/cffi-unix :components ((:file "init") (:file "interface" :depends-on (init)) diff --git a/init.lisp b/init.lisp index 62f67f61e926944a207b0daac481264f2d030120..5ed29661701e952f4e79b7cf338bc1b2d788be49 100644 --- a/init.lisp +++ b/init.lisp @@ -3,7 +3,7 @@ ; description: Load GSL ; date: Sat Mar 4 2006 - 18:53 ; author: Liam M. Healy -; modified: Wed Mar 8 2006 - 22:27 +; modified: Fri Mar 24 2006 - 15:30 ;******************************************************** (defpackage gsll @@ -21,3 +21,7 @@ (t (:default "libgsl"))) (cffi:use-foreign-library libgsl) + +;;; If cffi-unix is unavailable, uncomment the appropriate line: +;;; (cffi:defctype :size :unsigned-long) ; for 64 bit computers +;;; (cffi:defctype :size :uint) ; for 32 bit computers diff --git a/polynomial.lisp b/polynomial.lisp index 555152306db125112f07eb4c8e3dd60d39365942..f68e8658f6ca20cb43844ca7cc625b475c457c4c 100644 --- a/polynomial.lisp +++ b/polynomial.lisp @@ -3,7 +3,7 @@ ; description: Polynomials ; date: Tue Mar 21 2006 - 18:33 ; author: Liam M. Healy -; modified: Thu Mar 23 2006 - 10:47 +; modified: Fri Mar 24 2006 - 15:09 ;******************************************************** ;;; $Id: $ @@ -63,7 +63,7 @@ :pointer dd :pointer xac :pointer yac - :uint size ; "size_t is almost always an unsigned int" + :size size :int)) (list dd xac size))) @@ -80,7 +80,7 @@ "gsl_poly_dd_eval" :pointer (first dd) :pointer (second dd) - :uint (third dd) ; "size_t is almost always an unsigned int" + :size (third dd) :double x :double)) @@ -99,7 +99,7 @@ :double xp :pointer (first dd) :pointer (second dd) - :uint (third dd) ; "size_t is almost always an unsigned int" + :size (third dd) :pointer workspace :int) (cffi::foreign-array-to-lisp @@ -168,7 +168,7 @@ ;;; See /usr/include/gsl/gsl_poly.h (cffi:defcstruct poly-complex-workspace - (nc :uint) + (nc :size) (matrix :pointer)) (export '(with-poly-complex-workspace)) @@ -176,7 +176,7 @@ "Macro to create and cleanup workspace for polynomial root solver." `(let ((,workspace (funcall - (defun-sf :lambda ((n :uint)) + (defun-sf :lambda ((n :size)) "gsl_poly_complex_workspace_alloc" :return (poly-complex-workspace) @@ -189,7 +189,7 @@ :c-return-value :void))))) (defun-sf polynomial-solve - ((a :pointer) (n :uint) (workspace poly-complex-workspace)) + ((a :pointer) (n :size) (workspace poly-complex-workspace)) "gsl_poly_complex_solve" :documentation "The roots of the general polynomial