chiark / gitweb /
Fixed some compiler warnings
[clg] / glib / proxy.lisp
index 892bf74862587c1989115d1ba12d7f15edd2fc0d..7831a7677276da190d50ddd4cbd6f8258deef554 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: proxy.lisp,v 1.4 2001-05-11 16:01:41 espen Exp $
+;; $Id: proxy.lisp,v 1.7 2002-01-20 14:52:04 espen Exp $
 
 (in-package "GLIB")
 
@@ -189,11 +189,11 @@ (deftype-method translate-to-alien
   (if weak-ref
       `(proxy-location ,instance)
     `(funcall
-      (proxy-class-copy (find-class ',type-spec))
+      ',(proxy-class-copy (find-class type-spec))
       ',type-spec (proxy-location ,instance))))
 
 (deftype-method unreference-alien proxy (type-spec location)
-  `(funcall (proxy-class-free (find-class ',type-spec)) ',type-spec ,location))
+  `(funcall ',(proxy-class-free (find-class type-spec)) ',type-spec ,location))
 
 (defun proxy-instance-size (proxy)
   (proxy-class-size (class-of proxy)))
@@ -285,17 +285,18 @@   (defmethod compute-virtual-slot-accessors
        (slotd effective-virtual-alien-slot-definition)
        direct-slotds)
     (destructuring-bind (getter setter) (call-next-method)
-      (let ((class-name (class-name class)))
-       (with-slots (type) slotd
-         (list
-          (if (stringp getter)
-              (mkbinding getter type class-name)
-            getter)
-          (if (stringp setter)
-              (let ((setter (mkbinding setter 'nil class-name type)))
-                #'(lambda (value object)
-                    (funcall setter object value)))
-            setter))))))
+      (with-slots (type) slotd
+       (list
+        (if (stringp getter)
+            (let ((getter (mkbinding-late getter type 'pointer)))
+              #'(lambda (object)
+                  (funcall getter (proxy-location object))))
+          getter)
+        (if (stringp setter)
+            (let ((setter (mkbinding-late setter 'nil 'pointer type)))
+              #'(lambda (value object)
+                  (funcall setter (proxy-location object) value)))
+          setter)))))
 
   (defmethod compute-slots ((class proxy-class))
     (with-slots (direct-slots size) class