X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=examples%2Farrays.lisp;h=7e5c7bdf18e1e818eac7c64f0e8a24eeca12a1ce;hb=f5e6a5198989a460c4787041830d66fa76ebcdab;hp=0239e70998b49cdbfa3759d87db5bd7190adc6ab;hpb=3ade95bab16abe09642554e9cbf56f117f01e507;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))