Fixed a bug in the from-alien translation of ALIEN-STRUCTURE type
[clg] / glib / gtype.lisp
index 192e121..cc09744 100644 (file)
@@ -15,7 +15,7 @@
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-;; $Id: gtype.lisp,v 1.3 2000-08-23 14:27:41 espen Exp $
+;; $Id: gtype.lisp,v 1.5 2000-10-01 17:20:43 espen Exp $
 
 (in-package "GLIB")
 
 
 (deftype-method translate-type-spec alien-instance (type-spec)
   (declare (ignore type-spec))
-  'system-area-pointer)
+  (translate-type-spec 'pointer))
+
+(deftype-method size-of alien-instance (type-spec)
+  (declare (ignore type-spec))
+  (size-of 'pointer))
 
 
 
                            (alien::make-heap-alien-info
                             :type (alien::parse-alien-type
                                    `(function
-                                     void ,alien-type system-area-pointer))
+                                     void system-area-pointer ,alien-type))
                             :sap-form (system:foreign-symbol-address writer))))
                          (to-alien (get-to-alien-function type))
                          (cleanup  (get-cleanup-function type)))
          (:reference
           `(ensure-alien-instance
             ',type-spec
-            `(,(alien-copier type-spec)
-              location ,(alien-class-size (find-class type-spec)))))))))
+            (,(alien-copier type-spec)
+             location ,(alien-class-size (find-class type-spec)))))))))
 
 (deftype-method cleanup-alien alien-structure (type-spec sap &optional copied)
   (when copied