From 62d44d73e4d897f16a9f51e84c05a9a44d7387cf Mon Sep 17 00:00:00 2001 From: Liam Healy <liam@thinkpad.local> Date: Sun, 19 Dec 2010 16:14:09 -0500 Subject: [PATCH] Use fsbv:object instead of cffi:mem-aref --- init/funcallable.lisp | 4 ++-- random/generators.lisp | 6 +++--- special-functions/return-structures.lisp | 10 ++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/init/funcallable.lisp b/init/funcallable.lisp index 3ef4e7b0..535a137b 100644 --- a/init/funcallable.lisp +++ b/init/funcallable.lisp @@ -1,6 +1,6 @@ ;; Generate a lambda that calls the user function; will be called by callback. ;; Liam Healy -;; Time-stamp: <2010-11-25 09:09:40EST funcallable.lisp> +;; Time-stamp: <2010-12-19 16:04:33EST funcallable.lisp> ;; ;; Copyright 2009, 2010 Liam M. Healy ;; Distributed under the terms of the GNU General Public License @@ -97,7 +97,7 @@ ,@(affi::delinearize-index (affi:make-affi (value-from-dimensions argspec dimension-values)) linear-index)) - `(cffi:mem-aref + `(fsbv:object ,foreign-pointer-name ',(parse-callback-argspec argspec 'element-type) ,linear-index)) diff --git a/random/generators.lisp b/random/generators.lisp index 45736e7c..a9a8858a 100644 --- a/random/generators.lisp +++ b/random/generators.lisp @@ -1,8 +1,8 @@ ;; Generators of random numbers. ;; Liam Healy, Sat Jul 15 2006 - 14:43 -;; Time-stamp: <2010-07-16 17:11:25EDT generators.lisp> +;; Time-stamp: <2010-12-19 16:11:01EST generators.lisp> ;; -;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy +;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy ;; Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify @@ -169,7 +169,7 @@ (loop for i from 0 below (length ans) do (setf (aref ans i) - (mem-aref (rng-state gen) :uint8 i))) + (fsbv:object (rng-state gen) :uint8 i))) ans)) ;;;;**************************************************************************** diff --git a/special-functions/return-structures.lisp b/special-functions/return-structures.lisp index cad63f70..a0eac37d 100644 --- a/special-functions/return-structures.lisp +++ b/special-functions/return-structures.lisp @@ -1,8 +1,8 @@ ;; Structures returned by special functions. ;; Liam Healy, Mon Jan 1 2007 - 11:35 -;; Time-stamp: <2010-12-04 17:37:57EST return-structures.lisp> +;; Time-stamp: <2010-12-19 16:09:12EST return-structures.lisp> ;; -;; Copyright 2007, 2008, 2009 Liam M. Healy +;; Copyright 2007, 2008, 2009, 2010 Liam M. Healy ;; Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify @@ -44,8 +44,7 @@ ;;; up by cffi-grovel. For the time being, FSBV is required. #+fsbv -(fsbv:defconvert - (sf-result :constructor values) +(fsbv:defconvert (sf-result :constructor values) (val :double) (err :double)) @@ -53,8 +52,7 @@ (values val e10 err)) #+fsbv -(fsbv:defconvert - (sf-result-e10 :constructor values-e10) +(fsbv:defconvert (sf-result-e10 :constructor values-e10) (val :double) (err :double) (e10 :int)) -- GitLab