/[cmucl]/src/code/defstruct.lisp
ViewVC logotype

Diff of /src/code/defstruct.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by ram, Mon Oct 15 01:09:35 1990 UTC revision 1.16 by ram, Wed Oct 17 03:47:59 1990 UTC
# Line 316  Line 316 
316  ;;;    This function is called when we are redefining a structure from Old to  ;;;    This function is called when we are redefining a structure from Old to
317  ;;; New.  If the slots are different, we flame loudly, but give the luser a  ;;; New.  If the slots are different, we flame loudly, but give the luser a
318  ;;; chance to proceed.  We flame especially loudly if there are structures that  ;;; chance to proceed.  We flame especially loudly if there are structures that
319  ;;; include this one.  If proceeded, we FMAKUNBOUND all the old accessors.  ;;; include this one.  If proceeded, we FMAKUNBOUND all the old accessors.  If
320    ;;; the redefinition is not incompatible, we make the INCLUDED-BY of the new
321    ;;; definition be the same as the old one.
322  ;;;  ;;;
323  (defun %redefine-defstruct (old new)  (defun %redefine-defstruct (old new)
324    (declare (type defstruct-description old new))    (declare (type defstruct-description old new))
325    (unless (equalp (dd-slots old) (dd-slots new))    (cond
326       ((and (equalp (dd-slots old) (dd-slots new))
327             (equal (dd-includes old) (dd-includes new)))
328        (setf (dd-included-by new) (dd-included-by old)))
329       (t
330      (let ((name (dd-name old))      (let ((name (dd-name old))
331            (included-by (dd-included-by old)))            (included-by (dd-included-by old)))
332        (cerror        (cerror
# Line 336  Line 342 
342        (dolist (slot (dd-slots old))        (dolist (slot (dd-slots old))
343          (fmakunbound (dsd-accessor slot))          (fmakunbound (dsd-accessor slot))
344          (unless (dsd-read-only slot)          (unless (dsd-read-only slot)
345            (fmakunbound `(setf ,(dsd-accessor slot)))))))            (fmakunbound `(setf ,(dsd-accessor slot))))))))
346    
347    (undefined-value))    (undefined-value))
348    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.5