+(defun ref-int-32 (location &optional (offset 0))
+ #+(or cmu sbcl)(signed-sap-ref-32 location offset)
+ #+clisp(ffi:memory-as location 'ffi:sint32 offset))
+
+(defun (setf ref-int-32) (value location &optional (offset 0))
+ (setf
+ #+(or cmu sbcl)(signed-sap-ref-32 location offset)
+ #+clisp(ffi:memory-as location 'ffi:sint32 offset)
+ value))
+
+(defun ref-uint-32 (location &optional (offset 0))
+ #+(or cmu sbcl)(sap-ref-32 location offset)
+ #+clisp(ffi:memory-as location 'ffi:uint32 offset))
+
+(defun (setf ref-uint-32) (value location &optional (offset 0))
+ (setf
+ #+(or cmu sbcl)(sap-ref-32 location offset)
+ #+clisp(ffi:memory-as location 'ffi:uint32 offset)
+ value))
+
+(defun ref-single-float (location &optional (offset 0))
+ #+(or cmu sbcl)(sap-ref-single location offset)
+ #+clisp(ffi:memory-as location 'single-float offset))
+
+(defun (setf ref-single-float) (value location &optional (offset 0))
+ (setf
+ #+(or cmu sbcl)(sap-ref-single location offset)
+ #+clisp(ffi:memory-as location 'single-float offset)
+ value))
+
+(defun ref-double-float (location &optional (offset 0))
+ #+(or cmu sbcl)(sap-ref-double location offset)
+ #+clisp(ffi:memory-as location 'double-float offset))
+
+(defun (setf ref-double-float) (value location &optional (offset 0))
+ (setf
+ #+(or cmu sbcl)(sap-ref-double location offset)
+ #+clisp(ffi:memory-as location 'double-float offset)
+ value))
+
+
+