Stephen Compall <[EMAIL PROTECTED]> writes: > Stuart Sierra wrote: >> I'm working on a CFFI interface to the Perl API (I thought >> it would be fun - ha!) and I need to be able to do C-style >> pointer arithmetic. That is, I have a foreign pointer >> declared with DEFCVAR and I need to alter the address stored >> there. I couldn't see a way to do this with CFFI, so I > > You've got one half of the answer already -- `make-pointer'. Now see > `pointer-address' > (http://common-lisp.net/project/cffi/manual/html_node/pointer_002daddress.html).
But POINTER-ADDRESS is not setf-able, is it? I want to do this: (defcvar "stack_pointer" :pointer) (incf (pointer-address *stack-pointer*)) where "stack_pointer" is a global variable in an external library. But... The function (SETF POINTER-ADDRESS) is undefined. [Condition of type UNDEFINED-FUNCTION] -Stuart _______________________________________________ cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel