Ignore:
Timestamp:
03/28/10 21:41:27 (12 years ago)
Author:
astalla
Message:

Selected built-in classes can now be subclassed. Only SEQUENCE is allowed as of this revision.
This makes sequences user-extensible again.

File:
1 edited

Legend:

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

    r12576 r12578  
    579579  (getf canonical-slot :name))
    580580
     581(defvar *extensible-built-in-classes* (list (find-class 'sequence)))
     582
    581583(defun ensure-class (name &rest all-keys &key metaclass &allow-other-keys)
    582584  ;; Check for duplicate slots.
     
    603605  (let ((direct-superclasses (getf all-keys :direct-superclasses)))
    604606    (dolist (class direct-superclasses)
    605       (when (typep class 'built-in-class)
     607      (when (and (typep class 'built-in-class)
     608     (not (member class *extensible-built-in-classes*)))
    606609        (error "Attempt to define a subclass of a built-in-class: ~S" class))))
    607610  (let ((old-class (find-class name nil)))
Note: See TracChangeset for help on using the changeset viewer.