r3704: *** empty log message ***
[uffi.git] / src / objects.lisp
index c7fa563a2dcc717f15c622b1edfcefcdef900621..740b684b408becfd832a0480e4ffbdffa513139c 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: objects.lisp,v 1.4 2002/10/16 11:56:43 kevin Exp $
+;;;; $Id: objects.lisp,v 1.9 2002/12/30 20:39:22 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -44,11 +44,11 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated."
        #+sbcl
        `(sb-alien:make-alien ,(convert-from-uffi-type (eval type) :allocation))
        #+lispworks
-       `(fli:allocate-foreign-object :type ',(convert-from-uffi-type type :allocate))
+       `(fli:allocate-foreign-object :type ',(convert-from-uffi-type (eval type) :allocate))
        #+allegro
-       `(ff:allocate-fobject ,(convert-from-uffi-type type :allocate) :c)
+       `(ff:allocate-fobject ',(convert-from-uffi-type (eval type) :allocate) :c)
        #+mcl
-       `(new-ptr ,(size-of-foreign-type (convert-from-uffi-type type :allocation)))
+       `(new-ptr ,(size-of-foreign-type (convert-from-uffi-type (eval type) :allocation)))
        )
       (progn
        #+(or cmu scl)
@@ -56,11 +56,11 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated."
        #+sbcl
        `(sb-alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size)
        #+lispworks
-       `(fli:allocate-foreign-object :type ',(convert-from-uffi-type type :allocate) :nelems ,size)
+       `(fli:allocate-foreign-object :type ',(convert-from-uffi-type (eval 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 (eval type) :allocate)) ,size) :c)
        #+mcl
-       `(new-ptr (* ,size ,(size-of-foreign-type (convert-from-uffi-type type :allocation))))
+       `(new-ptr (* ,size ,(size-of-foreign-type (convert-from-uffi-type (eval type) :allocation))))
        )))
 
 (defmacro free-foreign-object (obj)
@@ -108,7 +108,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))
   )