mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 22:01:36 -08:00
MAKE-INSTANCE now works with structures, too
This commit is contained in:
parent
1c363e4dc3
commit
388cdfeef3
2 changed files with 6 additions and 2 deletions
|
|
@ -88,6 +88,9 @@ ECL 13.5.1
|
|||
- ASDF upgraded to version 2.32, including the ASDF-BUNDLE facility, which
|
||||
supersedes ECL's own implementation of precompiled libraries.
|
||||
|
||||
- MAKE-INSTANCE, SHARED-INITIALIZE, REINITIALIZE-INSTANCE now work on
|
||||
structures as well.
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
;;; fill-column:79 ***
|
||||
|
|
|
|||
|
|
@ -73,9 +73,10 @@
|
|||
;;;
|
||||
|
||||
;;; structure-classes cannot be instantiated
|
||||
(defmethod make-instance ((class structure-class) &rest initargs)
|
||||
(defmethod allocate-instance ((class structure-class) &rest initargs)
|
||||
(declare (ignore initargs))
|
||||
(error "The structure-class (~A) cannot be instantiated" class))
|
||||
(apply #'si::make-structure class
|
||||
(make-list (class-size class)) :initial-element (si::unbound)))
|
||||
|
||||
(defmethod finalize-inheritance ((class structure-class))
|
||||
(call-next-method)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue