[nio-cvs] r25 - branches/home/psmith/restructure/patches

psmith at common-lisp.net psmith at common-lisp.net
Thu Jan 4 04:29:35 UTC 2007


Author: psmith
Date: Wed Jan  3 23:29:35 2007
New Revision: 25

Added:
   branches/home/psmith/restructure/patches/
   branches/home/psmith/restructure/patches/cffi_0.9.2-mem_rw.diff
Log:
NIO needs following patch needed to cffi




Added: branches/home/psmith/restructure/patches/cffi_0.9.2-mem_rw.diff
==============================================================================
--- (empty file)
+++ branches/home/psmith/restructure/patches/cffi_0.9.2-mem_rw.diff	Wed Jan  3 23:29:35 2007
@@ -0,0 +1,24 @@
+58c58,60
+<    #:cancel-finalization))
+---
+>    #:cancel-finalization
+>    #:mem-read-vector
+>    #:mem-write-vector))
+319a322,338
+> 
+> 
+> ;;from http://common-lisp.net/project/cffi/darcs/cffi/doc/mem-vector.txt
+> 
+> (defun mem-read-vector (vector ptr type count &optional (offset 0))
+>   (loop for i below (min count (length vector))
+>      for off from offset by (%foreign-type-size type)
+>      do (setf (aref vector i) (%mem-ref ptr type off))
+>      finally (return i)))
+> 
+> (defun mem-write-vector (vector ptr type &optional (count (length vector)) (offset 0))
+>   (loop for i below count
+>       for off from offset by (%foreign-type-size type)
+>             do (setf (%mem-ref ptr type off) (aref vector i))
+>                   finally (return i)))
+> 
+> 



More information about the Nio-cvs mailing list