r10373: 2005-04-03 Kevin Rosenberg (kevin@rosenberg.net)
[uffi.git] / src / objects.lisp
index 358763e41fc829c815845886a3e898dcf31bd733..1510d246ccb5a6a139bd6361dbd8e59ad1570afe 100644 (file)
@@ -238,9 +238,9 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated."
   `(let ((,binding-name ,pointer))
     ,@body))
 
-#-(or lispworks cmu scl sbcl allegro)
+#-(or lispworks cmu scl sbcl allegro openmcl)
 (defmacro with-cast-pointer ((binding-name pointer type) &body body)
-  (declare (ignore binding-name pointer type))
+  (declare (ignore binding-name pointer type body))
   '(error "WITH-CAST-POINTER not (yet) implemented for ~A"
           (lisp-implementation-type)))
 
@@ -266,7 +266,12 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated."
                                     :module ,module)
       (define-symbol-macro ,lisp-name (fli:dereference (,lisp-name)
                                                         :copy-foreign-object nil)))
-    #-(or allegro cmu scl sbcl lispworks)
+    #+(and openmcl darwinppc-target)
+    (setf foreign-name (concatenate 'string "_" foreign-name))
+    #+openmcl
+    `(define-symbol-macro ,lisp-name
+       (deref-pointer (ccl:foreign-symbol-address ,foreign-name) ,var-type))
+    #-(or allegro cmu scl sbcl lispworks openmcl)
     `(define-symbol-macro ,lisp-name
       '(error "DEF-FOREIGN-VAR not (yet) defined for ~A"
         (lisp-implementation-type)))))