From 0e5e8dc759b478bf9ef55d45d80604c24faea2ae Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 10 Dec 2002 16:16:15 +0000 Subject: [PATCH] 0.7.10.15: Fix :CONC-NAME bug noted by Paul Dietz for cmucl (cmucl-imp 2002-12-08 ":conc-name by itself") --- NEWS | 2 ++ src/code/defstruct.lisp | 2 +- tests/defstruct.impure.lisp | 6 ++++++ version.lisp-expr | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 384db56..fcd3ece 100644 --- a/NEWS +++ b/NEWS @@ -1454,6 +1454,8 @@ changes in sbcl-0.7.11 relative to sbcl-0.7.10: ** IT is only a special loop symbol within the first clause of a conditional loop clause; ** FILE-STREAM now names the class previously known as FD-STREAM; + ** in DEFSTRUCT, a bare :CONC-NAME (or a :CONC-NAME with no + argument) no longer signals an error; * incremented fasl file version number, because of the incompatible change to the DEFSTRUCT-DESCRIPTION structure, and again because of the new implementation of DEFINE-COMPILER-MACRO. diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp index de54368..81af528 100644 --- a/src/code/defstruct.lisp +++ b/src/code/defstruct.lisp @@ -485,7 +485,7 @@ (name (dd-name dd))) (case (first option) (:conc-name - (destructuring-bind (conc-name) args + (destructuring-bind (&optional conc-name) args (setf (dd-conc-name dd) (if (symbolp conc-name) conc-name diff --git a/tests/defstruct.impure.lisp b/tests/defstruct.impure.lisp index a9d2f1e..cc9ab9b 100644 --- a/tests/defstruct.impure.lisp +++ b/tests/defstruct.impure.lisp @@ -416,6 +416,12 @@ ;;; FIXME: should probably do the same tests on DEFSTRUCT :TYPE +;;; As noted by Paul Dietz for CMUCL, :CONC-NAME handling was a little +;;; too fragile: +(defstruct (conc-name-syntax :conc-name) a-conc-name-slot) +(assert (eq (a-conc-name-slot (make-conc-name-syntax :a-conc-name-slot 'y)) + 'y)) + ;;; success (format t "~&/returning success~%") (quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 76fb233..536474c 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.10.14" +"0.7.10.15" -- 1.7.10.4