X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Faggregates.lisp;h=3fcb410c6702918ed727e6c1c56f208597b51a83;hb=52aa6156ffd6ff12b904f04d25ab3d4ee4126015;hp=e22f22b53d875839651901c388da77c0df421e20;hpb=04b9dd33bd3a19781998caa959feb926c1fbfe5f;p=uffi.git diff --git a/src/aggregates.lisp b/src/aggregates.lisp index e22f22b..3fcb410 100644 --- a/src/aggregates.lisp +++ b/src/aggregates.lisp @@ -2,12 +2,12 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: aggregates.cl +;;;; Name: aggregates.lisp ;;;; Purpose: UFFI source to handle aggregate types ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: aggregates.lisp,v 1.5 2002/11/23 19:07:11 kevin Exp $ +;;;; $Id$ ;;;; ;;;; 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) (defmacro def-enum (enum-name args &key (separator-string "#")) "Creates a constants for a C type enum list, symbols are created @@ -81,7 +80,8 @@ of the enum-name name, separator-string, and field-name" #+(or cmu scl) `((* (alien:struct ,name))) #+sbcl `((* (sb-alien:struct ,name))) #+mcl `((:* (:struct ,name))) - #-(or cmu sbcl scl mcl) `((* ,name)) + #+lispworks `((:pointer ,name)) + #-(or cmu sbcl scl mcl lispworks) `((* ,name)) `(,(convert-from-uffi-type type :struct)))))) (if variant (push (list def) processed) @@ -162,8 +162,8 @@ of the enum-name name, separator-string, and field-name" #+(or lispworks cmu sbcl scl) (declare (ignore type)) #+(or cmu scl) `(alien:deref ,obj ,i) #+sbcl `(sb-alien:deref ,obj ,i) - #+lispworks `(fli:dereference ,obj :index ,i) - #+allegro `(ff:fslot-value-typed (quote (convert-from-uffi-type ,type :type)) :c ,obj ,i) + #+lispworks `(fli:dereference ,obj :index ,i :copy-foreign-object nil) + #+allegro `(ff:fslot-value-typed (quote ,(convert-from-uffi-type type :type)) :c ,obj ,i) #+mcl (let* ((array-type (array-type type)) (local-type (convert-from-uffi-type array-type :allocation))