Changeset 257


Ignore:
Timestamp:
Jan 10, 2004, 10:24:47 PM (21 years ago)
Author:
Gary Byers
Message:

(SETF FIND-CLASS) checks more carefully for "protected classes".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-clos-boot.lisp

    r242 r257  
    11801180  name)
    11811181
     1182(defun check-setf-find-class-protected-class (old-class new-class name)
     1183  (when (and (standard-instance-p old-class)
     1184             (%class.kernel-p old-class)
     1185             *warn-if-redefine-kernel*
     1186             ;; EQL might be necessary on foreign classes
     1187             (not (eq new-class old-class)))
     1188    (cerror "Setf (FIND-CLASS ~s) to the new class."
     1189            "The class name ~s currently denotes the class ~s that
     1190marked as being a critical part of the system; an attempt is being made
     1191to replace that class with ~s" name old-class new-class)
     1192    (setf (%class.kernel-p old-class) nil)))
     1193
     1194
    11821195(queue-fixup
    11831196 (without-interrupts
     
    11881201      (when *warn-if-redefine-kernel*
    11891202        (let ((old-class (cdr cell)))
    1190           (when (and old-class (neq class old-class) (%class.kernel-p old-class))
    1191             (cerror "Redefine ~S."
    1192                     "~S is already defined in the CCL kernel." old-class)
    1193             (setf (%class.kernel-p old-class) nil))))
     1203          (when old-class
     1204            (check-setf-find-class-protected-class old-class class name))))
    11941205      (when (null class)
    11951206        (when cell
Note: See TracChangeset for help on using the changeset viewer.