Stephen Compall <[EMAIL PROTECTED]> writes: > On Fri, 2006-07-14 at 13:30 +0100, Luís Oliveira wrote: >> (defmacro incf-pointer (place &optional (offset 1)) >> `(setf ,place (inc-pointer ,place ,offset)))
> This evaluates the PLACE forms twice. Doh! > If I follow correctly, this can be more generally solved with a > cross-platform setf-expander for POINTER-ADDRESS that requires its PTR > arg to be a place, whereupon things like (incf (pointer-address > *ptr*)) and any other place-modifier should work. Hmm. I find that a bit confusing. (incf (pointer-address foo)) really makes it look look that foo's address is mutable. So, I propose incf-pointer again, this time without the double evaluation bug: (define-modify-macro incf-pointer (&optional (offset 1)) inc-pointer) -- Luís Oliveira luismbo (@) gmail (.) com http://student.dei.uc.pt/~lmoliv/ _______________________________________________ cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel