Changeset 12425


Ignore:
Timestamp:
02/06/10 17:00:32 (12 years ago)
Author:
ehuelsmann
Message:

No longer ignore the METACLASS defclass option;

instead act on it upon class creation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r12395 r12425  
    538538  (getf canonical-slot :name))
    539539
    540 (defun ensure-class (name &rest all-keys &allow-other-keys)
     540(defun ensure-class (name &rest all-keys
     541                     &key (metaclass 'standard-class) &allow-other-keys)
     542
     543  ;; Don't pass METACLASS on to the initialization routines
     544  ;; This only works because we *know* ABCL conses up new &rest lists
     545  ;; every time; otherwise, modifying the argument list is discouraged by the spec
     546  (remf all-keys :metaclass)
     547
    541548  ;; Check for duplicate slots.
    542549  (let ((slots (getf all-keys :direct-slots)))
     
    583590                  old-class)))
    584591          (t
    585            (let ((class (apply #'make-instance-standard-class
    586                                (find-class 'standard-class)
     592           (let ((class (apply (if (eq metaclass 'standard-class)
     593                                   #'make-instance-standard-class
     594                                   #'make-instance)
     595                               (or (when (symbolp metaclass)
     596                                     (find-class metaclass))
     597                                   metaclass)
    587598                               :name name all-keys)))
    588599             (%set-find-class name class)
Note: See TracChangeset for help on using the changeset viewer.