Fixed build problem with SBCL 0.9.11
[clg] / glib / gtype.lisp
index bcbb75a..9021bce 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtype.lisp,v 1.48 2006-02-26 16:12:25 espen Exp $
+;; $Id: gtype.lisp,v 1.50 2006-04-10 17:34:45 espen Exp $
 
 (in-package "GLIB")
 
 
 
 (defmethod finalize-inheritance ((class ginstance-class))
-  (call-next-method)
   (let* ((class-name (class-name class))
         (super (most-specific-proxy-superclass class))
         (gtype (or 
           (not (eq (class-name super) (supertype type-number))))
       (warn "Super class mismatch between CLOS and GObject for ~A"
        class-name)))
-  
-  (update-size class))
+  (update-size class)
+  (call-next-method))
 
 
 (defmethod shared-initialize ((class ginstance-class) names &rest initargs)
   (error "Doing copy-from-alien on a ref. counted class is most certainly an error, but if it really is what you want you should use REFERENCE-FOREIGN on the returned instance instead."))
 
 (define-type-method reader-function ((type ginstance))
-  #'(lambda (location &optional (offset 0) weak-p)
-      (declare (ignore weak-p))
-      (ensure-proxy-instance type (sap-ref-sap location offset))))
+  (let ((class (type-expand type)))
+    #'(lambda (location &optional (offset 0) weak-p)
+       (declare (ignore weak-p))
+       (ensure-proxy-instance class (sap-ref-sap location offset)))))
 
 
 ;;;; Registering fundamental types