- (if (or (symbolp gtype) (type-number-from-glib-name gtype nil))
- (register-type class-name gtype)
- (register-new-type class-name (class-name super) gtype)))))
- (unless (eq (class-name super) (supertype type-number))
- (warn "~A is the super type for ~A in the gobject type system."
- (supertype type-number) class-name))))
+ (let ((type-number
+ (if (or
+ (symbolp gtype)
+ (type-number-from-glib-name gtype nil))
+ (register-type class-name gtype)
+ (register-new-type class-name (class-name super) gtype))))
+ (type-class-ref type-number)
+ type-number))))
+ (when (and
+ (supertype type-number)
+ (not (eq (class-name super) (supertype type-number))))
+ (warn "Super class mismatch between CLOS and GObject for ~A"
+ class-name)))
+ (update-size class)
+ (call-next-method))
+
+
+(defmethod shared-initialize ((class ginstance-class) names &rest initargs)
+ (declare (ignore initargs))
+ (call-next-method)
+ (when (class-finalized-p class)
+ (update-size class)))
+