X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fobjects.lisp;h=9de66f9767a4c3495e6eeef54910a0180fdc2d8c;hb=0dbc9821c1d1f665a914585dcef97199e8334bf3;hp=6ec32234aaa87792332dc39ebc2bb0a4c65784ed;hpb=868ae7fad94b80592524dea37eae1000075605c6;p=uffi.git diff --git a/src/objects.lisp b/src/objects.lisp index 6ec3223..9de66f9 100644 --- a/src/objects.lisp +++ b/src/objects.lisp @@ -51,21 +51,9 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." ) (progn #+(or cmu scl) - (if (integerp size) - `(alien:cast - (alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size) - (array ,(convert-from-uffi-type (eval type) :allocation) ,size)) - `(alien:cast - (alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size) - (array ,(convert-from-uffi-type (eval type) :allocation) nil))) + `(alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size) #+sbcl - (if (integerp size) - `(sb-alien:cast - (sb-alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size) - (array ,(convert-from-uffi-type (eval type) :allocation) ,size)) - `(sb-alien:cast - (sb-alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size) - (array ,(convert-from-uffi-type (eval type) :allocation) nil))) + `(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) #+allegro