;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: objects.lisp,v 1.20 2003/08/23 01:05:53 kevin Exp $
+;;;; $Id$
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
#+mcl `(ccl:%null-ptr)
)
+(defmacro make-pointer (addr type)
+ #+(or allegro mcl) (declare (ignore type))
+ #+(or cmu scl) `(alien:sap-alien (system:int-sap ,addr) (* ,(convert-from-uffi-type (eval type) :type)))
+ #+sbcl `(sb-alien:sap-alien (sb-sys:int-sap ,addr) (* ,(convert-from-uffi-type (eval type) :type)))
+ #+lispworks `(fli:make-pointer :address ,addr :type (quote ,(convert-from-uffi-type (eval type) :type)))
+ #+allegro addr
+ #+mcl `(ccl:%int-to-ptr ,addr)
+ )
+
+
(defmacro char-array-to-pointer (obj)
#+(or cmu scl) `(alien:cast ,obj (* (alien:unsigned 8)))
#+sbcl `(sb-alien:cast ,obj (* (sb-alien:unsigned 8)))
,pointer (* ,(convert-from-uffi-type (eval type) :type)))))
,@body))
-#+allegro
+#+(or allegro openmcl)
(defmacro with-cast-pointer ((binding-name pointer type) &body body)
(declare (ignore type))
`(let ((,binding-name ,pointer))