X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=glib%2Fgobject.meta.lisp;h=120a958dc12bfa2ec4edd13092ccf0a9c2e8fab6;hb=96aa7293addaacdfe29ce32e60e2feac7df6ffce;hp=ad01deaa2589a0ffc3285f824754b64e6e1bb9f4;hpb=67f0b9d959c2abd9c4ce44f733473845232d483d;p=cl-gtk2.git diff --git a/glib/gobject.meta.lisp b/glib/gobject.meta.lisp old mode 100755 new mode 100644 index ad01dea..120a958 --- a/glib/gobject.meta.lisp +++ b/glib/gobject.meta.lisp @@ -19,21 +19,21 @@ (let* ((initializer-fn-ptr (foreign-symbol-pointer (gobject-class-g-type-initializer class))) (type (when initializer-fn-ptr (foreign-funcall-pointer initializer-fn-ptr nil - g-type)))) + g-type-designator)))) (if (null initializer-fn-ptr) (warn "Type initializer for class '~A' (GType '~A') is invalid: foreign symbol '~A'" (gobject-class-direct-g-type-name class) (class-name class) (gobject-class-g-type-initializer class)) (progn - (when (g-type= +g-type-invalid+ type) + (when (eq (gtype +g-type-invalid+) type) (warn "Declared GType name '~A' for class '~A' is invalid ('~A' returned 0)" (gobject-class-direct-g-type-name class) (class-name class) (gobject-class-g-type-initializer class))) - (unless (g-type= (gobject-class-direct-g-type-name class) type) + (unless (eq (gtype (gobject-class-direct-g-type-name class)) type) (warn "Declared GType name '~A' for class '~A' does not match actual GType name '~A'" (gobject-class-direct-g-type-name class) (class-name class) - (g-type-name type)))))) - (unless (g-type-from-name (gobject-class-direct-g-type-name class)) + (gtype-name type)))))) + (when (zerop (gtype-id (gtype (gobject-class-direct-g-type-name class)))) (warn "Declared GType name '~A' for class '~A' is invalid (g_type_name returned 0)" (gobject-class-direct-g-type-name class) (class-name class))))) @@ -63,8 +63,8 @@ (defmethod reinitialize-instance :around ((class gobject-class) &rest initargs &key (direct-superclasses nil d-s-p) &allow-other-keys) (declare (ignore direct-superclasses)) (if d-s-p - (call-next-method) - (apply #'call-next-method class (compute-new-initargs-for-metaclass initargs 'g-object)))) + (apply #'call-next-method class (compute-new-initargs-for-metaclass initargs 'g-object)) + (call-next-method))) (defmethod initialize-instance :after ((object gobject-class) &key &allow-other-keys) (when (gobject-class-direct-g-type-name object) @@ -72,6 +72,8 @@ (at-init (object) (initialize-gobject-class-g-type object)))) (defmethod finalize-inheritance :after ((class gobject-class)) + (iter (for superclass in (class-direct-superclasses class)) + (unless (class-finalized-p superclass) (finalize-inheritance superclass))) (setf (gobject-class-g-type-name class) (or (gobject-class-direct-g-type-name class) (let ((gobject-superclass (iter (for superclass in (class-direct-superclasses class))