ViewVC logotype

Diff of /redefines.lisp

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

revision 7 by rklochkov, Thu Aug 9 16:55:23 2012 UTC revision 8 by rklochkov, Sun Aug 12 17:36:30 2012 UTC
# Line 13  Line 13 
13        `(let ((,var (coerce ,value 'double-float))) ,@body)        `(let ((,var (coerce ,value 'double-float))) ,@body)
14        `(let ((,var ,value)) ,@body)))        `(let ((,var ,value)) ,@body)))
 ;; make type string with :free for uniformity  
 (define-foreign-type cffi-string (freeable)  
   (:actual-type :pointer)  
   (:simple-parser pstring))  
 (defmethod translate-to-foreign ((value string) (type cffi-string))  
   (values (foreign-string-alloc value) value))  
 (defmethod translate-to-foreign (value (type cffi-string))  
   (values (foreign-string-alloc (string value)) value))  
 (defmethod free-ptr ((type cffi-string) ptr)  
   (foreign-string-free ptr))  
 (defmethod translate-from-foreign (ptr (type cffi-string))  
   (foreign-string-to-lisp ptr))  
16  (define-foreign-type cffi-keyword (freeable)  (define-foreign-type cffi-keyword (freeable)
17    ()    ()
18    (:simple-parser cffi-keyword)    (:simple-parser cffi-keyword)
19    (:actual-type :string))    (:actual-type :pointer))
21  (defmethod translate-to-foreign ((value symbol) (type cffi-keyword))  (defmethod translate-to-foreign ((value symbol) (type cffi-keyword))
22    (convert-to-foreign (string-downcase value) :string))    (foreign-string-alloc (string-downcase value)))
24  (defmethod translate-to-foreign ((value string) (type cffi-keyword))  (defmethod translate-to-foreign ((value string) (type cffi-keyword))
25    (convert-to-foreign value :string))    (foreign-string-alloc value))
27    (defmethod free-ptr ((type cffi-keyword) ptr)
28      (foreign-string-free ptr))
30  (define-foreign-type cffi-pathname (freeable)  (define-foreign-type cffi-pathname (freeable)
31    ()    ()

Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.5