X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fobjects.lisp;h=4930962437287a78af3c4233be16a14d83c7ea42;hb=c1f5fa10b352b00c916dcf388be5ad1f49240a2c;hp=eca0c8f57403f485a3094fee64885482a5e7bff6;hpb=4b044499e8537c1a0fe6251421b8d82b2a89b384;p=uffi.git diff --git a/src/objects.lisp b/src/objects.lisp index eca0c8f..4930962 100644 --- a/src/objects.lisp +++ b/src/objects.lisp @@ -2,12 +2,12 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: objects.cl +;;;; Name: objects.lisp ;;;; Purpose: UFFI source to handle objects and pointers ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: objects.lisp,v 1.5 2002/11/14 22:11:07 kevin Exp $ +;;;; $Id: objects.lisp,v 1.15 2003/07/08 12:37:21 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -16,8 +16,7 @@ ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* -(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) -(in-package :uffi) +(in-package #:uffi) (defun size-of-foreign-type (type) #+lispworks (fli:size-of type) @@ -58,7 +57,7 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." #+lispworks `(fli:allocate-foreign-object :type ',(convert-from-uffi-type type :allocate) :nelems ,size) #+allegro - `(ff:allocate-fobject '(:array ,(convert-from-uffi-type (eval type) :allocate) ,(eval size)) :c) + `(ff:allocate-fobject (list :array (quote ,(convert-from-uffi-type type :allocate)) ,size) :c) #+mcl `(new-ptr (* ,size ,(size-of-foreign-type (convert-from-uffi-type type :allocation)))) ))) @@ -108,7 +107,7 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." #+(or cmu scl) `(alien:deref ,ptr) #+sbcl `(sb-alien:deref ,ptr) #+lispworks `(fli:dereference ,ptr) - #+allegro `(ff:fslot-value-typed ,(convert-from-uffi-type type :deref) :c ,ptr) + #+allegro `(ff:fslot-value-typed (quote ,(convert-from-uffi-type type :deref)) :c ,ptr) #+mcl `(ccl:pref ,ptr ,(convert-from-uffi-type type :deref)) )