[cffi-devel] Re: [PATCH] Return proper clisp value.
Luis Oliveira
luismbo at gmail.com
Thu Feb 14 23:19:18 UTC 2008
David Brown <lisp at davidb.org> writes:
> Without this, with-pointer-to-vector-data always results in NIL, which
> isn't nearly as useful.
Thanks for the bug report. Unfortunately darcs doesn't seem to
understand either of the two patches you sent. They seem to be missing
a couple of newline characters, but I'm not sure whether that's the
problem.
> + (unwind-protect
> + , at body
> + ;; copy-out
> + (loop for i below ,size-var do
> + (setf (aref ,vector-var i)
> + (%mem-ref ,ptr-var :unsigned-char i))))))))
Anyway, I pushed a slightly different fix: we want to wrap the BODY in a
PROGN. Also, I used PROG1 instead of UNWIND-PROTECT but I'm having
second thoughts. I'm going to write some tests for
WITH-POINTER-TO-VECTOR-DATA and most likely change that to
UNWIND-PROTECT.
--
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
More information about the cffi-devel
mailing list