X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=inline;f=examples%2Farrays.lisp;fp=examples%2Farrays.lisp;h=7e5c7bdf18e1e818eac7c64f0e8a24eeca12a1ce;hb=72190043201239567658cfbae1c36bbd7233419b;hp=0239e70998b49cdbfa3759d87db5bd7190adc6ab;hpb=da9ef130a96ba9102fc0cf68b1fe8cd0a90e67b7;p=uffi.git diff --git a/examples/arrays.lisp b/examples/arrays.lisp index 0239e70..7e5c7bd 100644 --- a/examples/arrays.lisp +++ b/examples/arrays.lisp @@ -36,20 +36,20 @@ (dotimes (r +row-length+) (declare (fixnum r)) (setf (uffi:deref-array a '(:array (* :long)) r) - (uffi:allocate-foreign-object :long +column-length+)) + (uffi:allocate-foreign-object :long +column-length+)) (let ((col (uffi:deref-array a '(:array (* :long)) r))) - (dotimes (c +column-length+) - (declare (fixnum c)) - (setf (uffi:deref-array col '(:array :long) c) (+ (* r +column-length+) c))))) + (dotimes (c +column-length+) + (declare (fixnum c)) + (setf (uffi:deref-array col '(:array :long) c) (+ (* r +column-length+) c))))) (dotimes (r +row-length+) (declare (fixnum r)) (format t "~&Row ~D: " r) (let ((col (uffi:deref-array a '(:array (* :long)) r))) - (dotimes (c +column-length+) - (declare (fixnum c)) - (let ((result (uffi:deref-array col '(:array :long) c))) - (format t "~d " result))))) + (dotimes (c +column-length+) + (declare (fixnum c)) + (let ((result (uffi:deref-array col '(:array :long) c))) + (format t "~d " result))))) (uffi:free-foreign-object a)) (values))