X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fobjects.lisp;h=f154990cef415047cc7aadb1cf46aed85b0d5961;hb=ee05cb79a6d8f5f532abbae802ccce2790d5e564;hp=82a9d0e8270960c5041310aa0bc1d59c0ef81527;hpb=6f682746787779a2475eec53d7d46efab891b392;p=uffi.git diff --git a/src/objects.lisp b/src/objects.lisp index 82a9d0e..f154990 100644 --- a/src/objects.lisp +++ b/src/objects.lisp @@ -98,15 +98,9 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." #+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) + #+mcl `(ccl:%int-to-ptr ,addr) ) -(defmacro pointer-address (ptr) - #+allegro ptr - #+(or cmu scl) `(system:sap-int (alien:alien-sap ,ptr)) - #+sbcl `(sb-sys:sap-int (sb-alien:alien-sap ,ptr)) - #+lispworks `(fli:pointer-address ,ptr) - #+mcl `(ccl:%ptr-to-int ,ptr)) (defmacro char-array-to-pointer (obj) #+(or cmu scl) `(alien:cast ,obj (* (alien:unsigned 8))) @@ -232,7 +226,7 @@ an array of TYPE with size SIZE. The TYPE parameter is evaluated." ,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))