;;;;
;;;; Copyright (c) 2002 Kevin M. Rosenberg
;;;;
-;;;; $Id: aggregates.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: aggregates.cl,v 1.3 2002/03/10 22:29:47 kevin Exp $
;;;;
;;;; This file is part of the UFFI.
;;;;
(defmacro def-array (name-array type)
#+allegro
`(ff:def-foreign-type ,name-array
- (:struct (:my-field (:array ,(convert-from-uffi-type type :array)))))
+ (:array ,(convert-from-uffi-type type :array)))
#+lispworks
`(fli:define-c-typedef ,name-array
(:pointer (:pointer ,(convert-from-uffi-type type :array))))
)
-(defmacro get-slot-value (obj slot type)
+(defmacro get-slot-value (obj type slot)
#+(or lispworks cmu) (declare (ignore type))
#+allegro
`(ff:fslot-value-typed ,type :c ,obj ,slot)
`(alien:slot ,obj ,slot)
)
-(defmacro get-slot-pointer (obj slot type)
+(defmacro get-slot-pointer (obj type slot)
#+(or lispworks cmu) (declare (ignore type))
#+allegro
`(ff:fslot-value-typed ,type :c ,obj ,slot)
`(alien:slot ,obj ,slot)
)
-(defmacro deref-array (obj i type)
+(defmacro deref-array (obj type i)
"Returns a field from a row"
#+(or lispworks cmu) (declare (ignore type))
#+cmu `(alien:deref ,obj ,i)
#+lispworks `(fli:dereference ,obj :index ,i)
- #+allegro `(ff:fslot-value-typed ,type :c ,obj ':my-field ,i)
+ #+allegro `(ff:fslot-value-typed ,type :c ,obj ,i)
)