clisp from CVS head, cffi-051229.tar.gz
CFFI[11]> (foreign-alloc 32)
*** - Unknown CFFI type: 32.
Thanks!
Yaroslav Kavenchuk kavenchuk@jenty.by writes:
CFFI[11]> (foreign-alloc 32)
Fixed the example, thanks.
make-pointer example:
CFFI[21]> (make-pointer 42) #<FOREIGN-ADDRESS #x0000002A> CFFI[22]> (pointerp *) T CFFI[23]> (pointer-adress **)
*** - EVAL: undefined function POINTER-ADRESS
Thanks!
On 2005-dec-30, at 12:47, Yaroslav Kavenchuk wrote:
*** - EVAL: undefined function POINTER-ADRESS
Thanks, fixed.
foreign-type-size:
CFFI[56]> (defcstruct foo (a :double) (c :char)) FOO CFFI[57]> (foreign-type-size :double) 8 CFFI[58]> (foreign-type-size :char) 1 CFFI[59]> (foreign-type-size 'foo) 16 ;; in example - 12
foreign-alloc:
CFFI[72]> (foreign-alloc :int :initial-contents '(1 2 3)) #<FOREIGN-ADDRESS #x012D54A0> CFFI[73]> (loop for i from 0 below 3 collect (mem-ref * :int i)) (1 33554432 131072) CFFI[74]> (foreign-alloc :int :initial-contents #(1 2 3)) #<FOREIGN-ADDRESS #x012D5578> CFFI[75]> (loop for i from 0 below 3 collect (mem-ref * :int i)) (1 33554432 131072)
Oops?
Thanks!
On 2005-dec-30, at 13:08, Yaroslav Kavenchuk wrote:
CFFI[59]> (foreign-type-size 'foo) 16 ;; in example - 12
Well.. it /could/ be 12. :-)
CFFI[74]> (foreign-alloc :int :initial-contents #(1 2 3)) #<FOREIGN-ADDRESS #x012D5578> CFFI[75]> (loop for i from 0 below 3 collect (mem-ref * :int i)) (1 33554432 131072)
Oops, another typo. Fixed. Thanks.