Changeset 13209


Ignore:
Timestamp:
02/08/11 21:46:47 (11 years ago)
Author:
ehuelsmann
Message:

Add documentation to STD-SHARED-INITIALIZE and
add initarg checking to REINITIALIZE-INSTANCE.

File:
1 edited

Legend:

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

    r13208 r13209  
    26512651;; it received."
    26522652(defmethod reinitialize-instance ((instance standard-object) &rest initargs)
     2653  (check-initargs (list #'reinitialize-instance) (list* instance initargs)
     2654                  instance () initargs)
    26532655  (apply #'shared-initialize instance () initargs))
    26542656
     
    26562658  (when (oddp (length all-keys))
    26572659    (error 'program-error :format-control "Odd number of keyword arguments."))
     2660  ;; do a quick scan of the arguments list to see if it's a real
     2661  ;; 'initialization argument list' (which is not the same as
     2662  ;; checking initarg validity
    26582663  (do* ((tail all-keys (cddr tail))
    2659   (initarg (car tail) (car tail)))
     2664        (initarg (car tail) (car tail)))
    26602665      ((null tail))
    26612666    (when (and initarg (not (symbolp initarg)))
    26622667      (error 'program-error
    2663        :format-control "Invalid initarg ~S."
    2664        :format-arguments (list initarg))))
     2668             :format-control "Invalid initarg ~S."
     2669             :format-arguments (list initarg))))
    26652670  (dolist (slot (class-slots (class-of instance)))
    26662671    (let ((slot-name (slot-definition-name slot)))
Note: See TracChangeset for help on using the changeset viewer.