From 554303a5217026139af0c1b18632155d70c09eb0 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 5 Dec 2008 13:47:37 +0000 Subject: [PATCH] 1.0.23.26: AMOPly correct defaulting of direct superclasses "The class standard-object is the default direct superclass of the class standard-class. When an instance of the class standard-class is created, and no direct superclasses are explicitly specified, it defaults to the class standard-object." "The same is true for funcallable-standard-class and funcallable-standard-object." * Add :DEFAULT-INITARGS to that effect. --- NEWS | 3 +++ src/pcl/defs.lisp | 8 ++++++-- tests/mop.pure.lisp | 6 ++++++ version.lisp-expr | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index ea3c281..9e95efb 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ * bug fix: SET-DISPATCH-MACRO-CHARACTER accepts NIL as the readtable designator, and returns T instead of the function. (thanks to Tobias Rittweiler) + * bug fix: direct superclasses of STANDARD-CLASS and + FUNCALLABLE-STANDARD-CLASS now default to STANDARD-OBJECT and + FUNCALLABLE-STANDARD-OBJECT as required by AMOP. changes in sbcl-1.0.23 relative to 1.0.22: * enhancement: when disassembling method functions, disassembly diff --git a/src/pcl/defs.lisp b/src/pcl/defs.lisp index 674519e..c6908d6 100644 --- a/src/pcl/defs.lisp +++ b/src/pcl/defs.lisp @@ -668,10 +668,14 @@ ()) (defclass standard-class (std-class) - ()) + () + (:default-initargs + :direct-superclasses (list *the-class-standard-object*))) (defclass funcallable-standard-class (std-class) - ()) + () + (:default-initargs + :direct-superclasses (list *the-class-funcallable-standard-object*))) (defclass forward-referenced-class (pcl-class) ()) diff --git a/tests/mop.pure.lisp b/tests/mop.pure.lisp index c443cef..cb60b25 100644 --- a/tests/mop.pure.lisp +++ b/tests/mop.pure.lisp @@ -79,3 +79,9 @@ for class = (find-class class-name) for results = (test-class-slots class) when results do (cerror "continue" "~A" results)))) + +;;; AMOP says these are the defaults +(assert (equal (list (find-class 'standard-object)) + (sb-mop:class-direct-superclasses (make-instance 'standard-class)))) +(assert (equal (list (find-class 'sb-mop:funcallable-standard-object)) + (sb-mop:class-direct-superclasses (make-instance 'sb-mop:funcallable-standard-class)))) diff --git a/version.lisp-expr b/version.lisp-expr index d7d3aaf..a03a8a4 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".) -"1.0.23.25" +"1.0.23.26" -- 1.7.10.4