r6298: convert .cvsignore to svn:ignore properties
[uffi.git] / src / aggregates.lisp
index e22f22b53d875839651901c388da77c0df421e20..cea43e687aaaa0592a0917781cbc1d584ce39eb1 100644 (file)
@@ -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: aggregates.lisp,v 1.9 2003/08/26 13:29:31 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)
 
 (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))