/[cffi-objects]/struct.lisp
ViewVC logotype

Diff of /struct.lisp

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

revision 8 by rklochkov, Sun Aug 12 17:36:30 2012 UTC revision 9 by rklochkov, Fri Aug 24 19:26:53 2012 UTC
# Line 127  Only exception is the presence of OBJECT Line 127  Only exception is the presence of OBJECT
127    ()    ()
128    (:actual-type :pointer))    (:actual-type :pointer))
129    
 (defmethod free-ptr ((type cffi-struct) ptr)  
   (free-struct (object-class type) ptr))  
   
130  (defmethod free-sent-ptr ((type cffi-struct) ptr place)  (defmethod free-sent-ptr ((type cffi-struct) ptr place)
131    (when (and (slot-boundp place 'value) (not (null-pointer-p ptr)))    (when (and (slot-boundp place 'value) (not (null-pointer-p ptr)))
132      (free-struct (object-class type) ptr)))      (free-struct (object-class type) ptr)))
133    
134    (defmethod free-returned-ptr ((type cffi-struct) ptr)
135      (unless (null-pointer-p ptr)
136        (free-struct (object-class type) ptr)))
137    
138    
139  (defmethod foreign-type-size ((type cffi-struct))  (defmethod foreign-type-size ((type cffi-struct))
140    "Return the size in bytes of a foreign typedef."    "Return the size in bytes of a foreign typedef."

Legend:
Removed from v.8  
changed lines
  Added in v.9

  ViewVC Help
Powered by ViewVC 1.1.5