Changeset 5054


Ignore:
Timestamp:
12/10/03 17:31:01 (18 years ago)
Author:
piso
Message:

ALLOCATE-INSTANCE is a generic function.

File:
1 edited

Legend:

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

    r5053 r5054  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: clos.lisp,v 1.29 2003-12-10 16:33:58 piso Exp $
     4;;; $Id: clos.lisp,v 1.30 2003-12-10 17:31:01 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    507507   (allocate-slot-storage (count-if #'instance-slot-p (class-slots class))
    508508                          +slot-unbound+)))
    509 
    510 (defun allocate-instance (class)
    511   (std-allocate-instance class))
    512509
    513510(defun make-instance-standard-class (metaclass
     
    14161413;;; Instance creation and initialization
    14171414
     1415(defgeneric allocate-instance (class &rest initargs &key &allow-other-keys))
     1416
     1417(defmethod allocate-instance ((class standard-class) &rest initargs)
     1418  (std-allocate-instance class))
     1419
    14181420(defgeneric make-instance (class &key))
    14191421
     
    14301432            (setf default-initargs (append default-initargs (list key (funcall fn))))))
    14311433        (setf initargs (append initargs default-initargs)))))
    1432   (let ((instance (allocate-instance class)))
     1434  (let ((instance (std-allocate-instance class)))
    14331435    (apply #'initialize-instance instance initargs)
    14341436    instance))
     
    14701472
    14711473(defgeneric change-class (instance new-class &key))
     1474
    14721475(defmethod change-class
    14731476  ((old-instance standard-object)
     
    14941497
    14951498(defgeneric update-instance-for-different-class (old new &key))
     1499
    14961500(defmethod update-instance-for-different-class
    14971501  ((old standard-object) (new standard-object) &rest initargs)
Note: See TracChangeset for help on using the changeset viewer.