[cl-cairo2-devel] translation of my-double type to foreign is broken
Tamas K Papp
tpapp at Princeton.EDU
Mon Apr 21 13:04:54 UTC 2008
Hi Dmitry,
I have just committed a revision of cl-cairo2 which I believe fixes
the issue (uses CFFI's fancy define-foreign-type, with the help of
Luis Oliveira).
If you have the time, please check if the new version fixes things for
you, it works for me.
Also, thanks for the bug report.
Enjoy cl-cairo2,
Tamas
On Mon, Apr 21, 2008 at 04:04:04AM +0400, Dmitry Pavlov wrote:
> > In the meantime, can you tell me what the following
> > does on your version:
>
> CL-USER> (require :cffi)
> NIL
> CL-USER> (cffi:defctype my-double :double)
> MY-DOUBLE
> CL-USER> (defmethod cffi:translate-to-foreign (value (type (eql 'my-double)))
> (coerce value 'double-float))
> #<STANDARD-METHOD CFFI:TRANSLATE-TO-FOREIGN (T
> (EQL MY-DOUBLE)) {10038378E1}>
> CL-USER> (cffi:translate-to-foreign 10 'my-double)
> 10.0d0
> CL-USER> (cffi:convert-to-foreign 10 'my-double)
> 10
>
>
> Regards,
> Dmitry
More information about the Cl-cairo2-devel
mailing list