21 Apr
2008
21 Apr
'08
12:54 p.m.
On Mon, Apr 21, 2008 at 12:42 AM, Tamas K Papp <tpapp@princeton.edu> wrote:
(cffi:defctype my-double :double)
(defmethod cffi:translate-to-foreign (value (type (eql 'my-double))) (coerce value 'double-float))
That should be: * (define-foreign-type my-double-type () () (:actual-type :double) (:simple-parser my-double)) MY-DOUBLE-TYPE * (defmethod translate-to-foreign (value (type my-double-type)) (coerce value 'double-float)) #<STANDARD-METHOD TRANSLATE-TO-FOREIGN (T MY-DOUBLE-TYPE) {1003370511}> * (convert-to-foreign 10 'my-double) 10.0d0 -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/