[cl-cairo2-devel] translation of my-double type to foreign is broken
Dmitry Pavlov
dmitry.pavlov at gmail.com
Mon Apr 21 00:04:04 UTC 2008
> 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