/[cl-cairo2]/cl-cairo2-swig.lisp
ViewVC logotype

Diff of /cl-cairo2-swig.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 18 by tpapp, Sun Apr 20 23:37:41 2008 UTC revision 19 by tpapp, Mon Apr 21 13:01:57 2008 UTC
# Line 1  Line 1 
1    
2  (in-package :cl-cairo2)  (in-package :cl-cairo2)
3    
4  (defctype my-double :double)  ;; define our own alias for double float, so we can automatically
5  ;; (defmethod cffi:expand-to-foreign (value (type (eql 'my-double)))  ;; convert other numerical types in the arguments
6  ;;   `(coerce ,value 'double-float))  (define-foreign-type my-double-type ()
7  (defmethod translate-to-foreign (value (type (eql 'my-double)))    ()
8     (coerce value 'double-float))    (:actual-type :double)
9      (:simple-parser my-double))
10    
11    (defmethod translate-to-foreign (value (type my-double-type))
12      (coerce value 'double-float))
13    
14  ;; typedefs: we don't want to create all of them automatically,  ;; typedefs: we don't want to create all of them automatically,
15  ;; because typedefs for structures confuse with-foreign-slots  ;; because typedefs for structures confuse with-foreign-slots

Legend:
Removed from v.18  
changed lines
  Added in v.19

  ViewVC Help
Powered by ViewVC 1.1.5