Last change
on this file was
27,
checked in by psmith, 18 years ago
|
Added first steps of YetAnotherRPC protocol
|
File size:
756 bytes
|
Line | |
---|
1 | 58c58,60 |
---|
2 | < #:cancel-finalization)) |
---|
3 | --- |
---|
4 | > #:cancel-finalization |
---|
5 | > #:mem-read-vector |
---|
6 | > #:mem-write-vector)) |
---|
7 | 319a322,338 |
---|
8 | > |
---|
9 | > |
---|
10 | > ;;from http://common-lisp.net/project/cffi/darcs/cffi/doc/mem-vector.txt |
---|
11 | > |
---|
12 | > (defun mem-read-vector (vector ptr type count &optional (offset 0)) |
---|
13 | > (loop for i below (min count (length vector)) |
---|
14 | > for off from offset by (%foreign-type-size type) |
---|
15 | > do (setf (aref vector i) (%mem-ref ptr type off)) |
---|
16 | > finally (return i))) |
---|
17 | > |
---|
18 | > (defun mem-write-vector (vector ptr type &optional (count (length vector)) (offset 0)) |
---|
19 | > (loop for i below count |
---|
20 | > for off from offset by (%foreign-type-size type) |
---|
21 | > do (%mem-set (aref vector i) ptr type off) |
---|
22 | > finally (return i))) |
---|
23 | > |
---|
24 | > |
---|
Note: See
TracBrowser
for help on using the repository browser.