projects
/
uffi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r1594: *** empty log message ***
[uffi.git]
/
examples
/
array-2d.cl
diff --git
a/examples/array-2d.cl
b/examples/array-2d.cl
index 9e344db55f2882182e20e89d0aea01b9a6c2cdd0..5a9522098a9cba540ede849e73214dd7dff81d5e 100644
(file)
--- a/
examples/array-2d.cl
+++ b/
examples/array-2d.cl
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Mar 2002
;;;;
-;;;; $Id: array-2d.cl,v 1.
1 2002/03/18 02:27:32
kevin Exp $
+;;;; $Id: array-2d.cl,v 1.
2 2002/03/18 22:47:57
kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
@@
-20,16
+20,15
@@
(uffi:def-constant +column-length+ 10)
(uffi:def-constant +column-length+ 10)
-(uffi:def-array long-array (:long 10))
-
(defun test-array-2d ()
"Tests 2d array"
(defun test-array-2d ()
"Tests 2d array"
- (let ((a (uffi:allocate-foreign-object
long-array
)))
+ (let ((a (uffi:allocate-foreign-object
:long +column-length+
)))
(dotimes (i +column-length+)
(dotimes (i +column-length+)
- (setf (uffi:deref-array a
:long
i) (* i i)))
+ (setf (uffi:deref-array a
'(:array :long)
i) (* i i)))
(dotimes (i +column-length+)
(dotimes (i +column-length+)
- (format "~&~D => ~D" i (uffi:deref-array a 'long-array i)))
- (uffi:free-foreign-object a)))
+ (format t "~&~D => ~D" i (uffi:deref-array a '(:array :long) i)))
+ (uffi:free-foreign-object a))
+ (values))
#+test-uffi
(test-array-2d)
#+test-uffi
(test-array-2d)