r9264: fix for deref-array for openmcl
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 6 May 2004 16:14:22 +0000 (16:14 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 6 May 2004 16:14:22 +0000 (16:14 +0000)
debian/changelog
src/aggregates.lisp

index 6c502e67f244f326d99b0f12509cf7ce4b49eb6f..5daf2e80d3021fb2aadbffdbc87440c5b77e8c8c 100644 (file)
@@ -1,3 +1,9 @@
+cl-uffi (1.4.13-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Thu,  6 May 2004 10:14:10 -0600
+
 cl-uffi (1.4.12-1) unstable; urgency=low
 
   * New upstream
index 3fcb410c6702918ed727e6c1c56f208597b51a83..523bd4f72983eadee80b0aa91ef86c6e3bae09ca 100644 (file)
@@ -164,17 +164,26 @@ of the enum-name name, separator-string, and field-name"
   #+sbcl  `(sb-alien:deref ,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
+  #+openmcl
   (let* ((array-type (array-type type))
          (local-type (convert-from-uffi-type array-type :allocation))
-         (accessor (first (macroexpand `(ccl:pref obj ,local-type)))))
-    `(,accessor 
+        (element-size-in-bits (ccl::%foreign-type-or-record-size local-type :bits)))
+    (ccl::%foreign-access-form
+     obj
+     (ccl::%foreign-type-or-record local-type)
+     `(* ,i ,element-size-in-bits)
+     nil))
+  #+(and mcl (not openmcl))
+  (let* ((array-type (array-type type))
+        (local-type (convert-from-uffi-type array-type :allocation))
+        (accessor (first (macroexpand `(ccl:pref obj ,local-type)))))
+    `(,accessor
       ,obj
       (* (the fixnum ,i) ,(size-of-foreign-type local-type))))
   )
 
 ; this expands to the %set-xx functions which has different params than %put-xx
-#+mcl
+#+(and mcl (not openmcl))
 (defmacro deref-array-set (obj type i value)
   (let* ((array-type (array-type type))
          (local-type (convert-from-uffi-type array-type :allocation))
@@ -185,7 +194,7 @@ of the enum-name name, separator-string, and field-name"
       (* (the fixnum ,i) ,(size-of-foreign-type local-type)) 
       ,value)))
 
-#+mcl
+#+(and mcl (not openmcl))
 (defsetf deref-array deref-array-set)
 
 (defmacro def-union (name &rest fields)