David Brown <[EMAIL PROTECTED]> 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
> +              ,@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/

_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to