r2892: *** empty log message ***
[uffi.git] / src-mcl / aggregates.cl
index b59615a31c17e370eb1ffd6617426d97d9359e86..428013c1bc5243372884fed1f2d9fc7b48894c29 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmers:   Kevin M. Rosenberg and John DeSoi
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: aggregates.cl,v 1.2 2002/09/20 04:51:14 kevin Exp $
+;;;; $Id: aggregates.cl,v 1.3 2002/09/30 01:57:32 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;; and John DeSoi
@@ -56,7 +56,10 @@ of the enum-name name, separator-string, and field-name"
 
 
 (defmacro def-array-pointer (name-array type)
-  `(def-mcl-type ,name-array '(:array ,type)))
+  #-openmcl
+  `(def-mcl-type ,name-array '(:array ,type))
+  #+openmcl
+  `(ccl::def-foreign-type ,name-array (:array ,(convert-from-uffi-type type :array))))
 
 
 
@@ -100,10 +103,14 @@ of the enum-name name, separator-string, and field-name"
       (let* ((field-name (car field))
             (type (cadr field))
              (def  (append (list field-name)
-                   (if (eq type :pointer-self)
-                       #+cmu `((* (alien:struct ,name)))
-                       #-cmu `((* ,name))
-                       `(,(convert-from-uffi-type type :struct))))))
+                   (cond
+                     ((eq type :pointer-self)
+                      #+cmu `((* (alien:struct ,name)))
+                      #+openmcl `((:* (:struct ,name)))
+                      #-(or cmu openmcl) `((* ,name))
+                      )
+                     (t
+                      `(,(convert-from-uffi-type type :struct)))))))
         (if variant
           (push (list def) processed)
           (push def processed))))
@@ -166,4 +173,4 @@ of the enum-name name, separator-string, and field-name"
 (setf (get-slot-value s :struct :u1.s1) 5)
 (get-slot-value s :struct :u1.s1)
 
-|#
\ No newline at end of file
+|#