From 9247f1e1e1daa42ed0c7d6df860ed7056fb8225e Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Wed, 9 Jul 2003 12:30:12 +0000 Subject: [PATCH] 0.8.1.28: * s/*THE-PCL-PACKAGE*/*PCL-PACKAGE*/ (reported by Istvan Marko). --- NEWS | 2 ++ src/pcl/ctor.lisp | 2 +- tests/clos.impure.lisp | 13 +++++++++++++ version.lisp-expr | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 97aeccc..8c61ff0 100644 --- a/NEWS +++ b/NEWS @@ -1911,6 +1911,8 @@ changes in sbcl-0.8.2 relative to sbcl-0.8.1: * repeated evaluation of the same DEFSTRUCT, a slot of which is declared to have a functional type, does not cause an error anymore. + * fixed bug: sometimes MAKE-INSTANCE did not work with classes with + many :DEFAULT-INITARGS. (reported by Istvan Marko) * fixed some bugs revealed by Paul Dietz' test suite: ** LAST and [N]BUTLAST should accept a bignum. diff --git a/src/pcl/ctor.lisp b/src/pcl/ctor.lisp index 0ef967b..ca88083 100644 --- a/src/pcl/ctor.lisp +++ b/src/pcl/ctor.lisp @@ -456,7 +456,7 @@ (let ((ps #(.d0. .d1. .d2. .d3. .d4. .d5.))) (if (array-in-bounds-p ps i) (aref ps i) - (intern (format nil ".D~D." i) *the-pcl-package*))))) + (intern (format nil ".D~D." i) *pcl-package*))))) ;; Loop over supplied initargs and values and record which ;; instance and class slots they initialize. (loop for (key value) on initargs by #'cddr diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index a319f42..2f8d99c 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -663,5 +663,18 @@ (list x (call-next-method) (call-next-method x)))) (assert (equal (cnm-assignment 1) '(3 1 3))) +;;; Bug reported by Istvan Marko 2003-07-09 +(let ((class-name (gentemp))) + (loop for i from 1 to 9 + for slot-name = (intern (format nil "X~D" i)) + for initarg-name = (intern (format nil "X~D" i) :keyword) + collect `(,slot-name :initarg ,initarg-name) into slot-descs + append `(,initarg-name (list 0)) into default-initargs + finally (eval `(defclass ,class-name () + (,@slot-descs) + (:default-initargs ,@default-initargs)))) + (let ((f (compile nil `(lambda () (make-instance ',class-name))))) + (assert (typep (funcall f) class-name)))) + ;;;; success (sb-ext:quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 55a1b79..d7fc450 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.1.27" +"0.8.1.28" -- 1.7.10.4