Skip to content
Snippets Groups Projects
Commit 62d44d73 authored by Liam Healy's avatar Liam Healy
Browse files

Use fsbv:object instead of cffi:mem-aref

parent 4610fb4b
No related branches found
No related tags found
No related merge requests found
;; 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))
......
;; 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))
;;;;****************************************************************************
......
;; 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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment