/[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.83 by toy, Thu Mar 27 19:23:17 2003 UTC revision 1.84 by gerd, Sun Mar 30 18:43:59 2003 UTC
# Line 1380  Line 1380 
1380              (setf (%instance-ref structure (dsd-index dsd)) new-value)))))              (setf (%instance-ref structure (dsd-index dsd)) new-value)))))
1381    
1382    
1383    ;;;
1384    ;;; Used for updating CLOS structure classes.  Hooks are called
1385    ;;; with one argument, the kernel::class.
1386    ;;;
1387    (defvar *defstruct-hooks* nil)
1388    
1389  ;;; %Defstruct  --  Internal  ;;; %Defstruct  --  Internal
1390  ;;;  ;;;
1391  ;;;    Do miscellaneous (LOAD EVAL) time actions for the structure described by  ;;;    Do miscellaneous (LOAD EVAL) time actions for the structure described by
# Line 1407  Line 1413 
1413             (setq layout (%class-layout class))))             (setq layout (%class-layout class))))
1414    
1415      (setf (find-class (dd-name info)) class)      (setf (find-class (dd-name info)) class)
1416    
1417      (unless (eq (dd-type info) 'funcallable-structure)      (unless (eq (dd-type info) 'funcallable-structure)
1418        (dolist (slot (dd-slots info))        (dolist (slot (dd-slots info))
1419          (unless (or (dsd-inherited-p info slot)          (unless (or (dsd-inherited-p info slot)
# Line 1439  Line 1445 
1445                             :expected-type class                             :expected-type class
1446                             :format-control "Structure for copier is not a ~S:~% ~S"                             :format-control "Structure for copier is not a ~S:~% ~S"
1447                             :format-arguments (list class structure)))                             :format-arguments (list class structure)))
1448                    (copy-structure structure))))))                    (copy-structure structure))))
1449    
1450          (when (boundp '*defstruct-hooks*)
1451            (dolist (fn *defstruct-hooks*)
1452              (funcall fn class)))))
1453    
1454    (when (dd-doc info)    (when (dd-doc info)
1455      (setf (documentation (dd-name info) 'type) (dd-doc info)))      (setf (documentation (dd-name info) 'type) (dd-doc info)))

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.84

  ViewVC Help
Powered by ViewVC 1.1.5