X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/ea96309cdf9d50b46cfcfce9db0521b9b4b34561..0aef7aaac0868dce7a5d3acc38824600943c235b:/gffi/basic-types.lisp diff --git a/gffi/basic-types.lisp b/gffi/basic-types.lisp index b09069b..e5582db 100644 --- a/gffi/basic-types.lisp +++ b/gffi/basic-types.lisp @@ -20,7 +20,7 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: basic-types.lisp,v 1.7 2007-06-01 06:22:05 espen Exp $ +;; $Id: basic-types.lisp,v 1.9 2007-06-20 09:49:06 espen Exp $ (in-package "GFFI") @@ -459,7 +459,8 @@ have been written as temporal.") (define-type-method writer-function ((type single-float) &key temp (inlined t)) (declare (ignore temp)) (assert-inlined type inlined) - #'(setf ref-single-float)) + #'(lambda (number location &optional (offset 0)) + (setf (ref-single-float location offset) (coerce number 'single-float)))) (define-type-method reader-function ((type single-float) &key ref (inlined t)) (declare (ignore ref)) @@ -1135,12 +1136,12 @@ have been written as temporal.") (define-type-method to-alien-function ((type static) &optional copy-p) (if (not copy-p) (to-alien-function (second (type-expand-to 'static type)) t) - (error "COPY-P argument to TO-ALIEN-FUNCTION should always be NIL for type ~A" type))) + (error "COPY-P argument to TO-ALIEN-FUNCTION should always be NIL for type ~A" type))) (define-type-method to-alien-form ((type static) &optional copy-p) (if (not copy-p) - (to-alien-function (second (type-expand-to 'static type)) t) - (error "COPY-P argument to TO-ALIEN-FORM should always be NIL for type ~A" type))) + (to-alien-form (second (type-expand-to 'static type)) t) + (error "COPY-P argument to TO-ALIEN-FORM should always be NIL for type ~A" type))) (define-type-method reader-function ((type static) &key (ref :read) (inlined nil inlined-p)) (if inlined-p