From: Alexey Dejneka Date: Wed, 12 Mar 2003 12:44:03 +0000 (+0000) Subject: 0.7.13.25: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=3586bad78cd1b61c356ec74a4e7bcced1eb69cb3;p=sbcl.git 0.7.13.25: Fixed bug reported by Rolf Wester on comp.lang.lisp: DEFPARAMETER and DEFVAR now always assign a dynamic variable. --- diff --git a/NEWS b/NEWS index fc6bd66..7aae843 100644 --- a/NEWS +++ b/NEWS @@ -1601,6 +1601,8 @@ changes in sbcl-0.7.14 relative to sbcl-0.7.13: on malformed property lists; * fixed SXHASH, giving different results for NIL depending on type declarations (SYMBOL or LIST). (thanks to Gerd Moellmann) + * fixed bug in DEFPARAMETER and DEFVAR: they could assign a lexical + variable. (found by Rolf Wester) planned incompatible changes in 0.7.x: * (not done yet, but planned:) When the profiling interface settles diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index e2bd2c2..46ed79e 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -228,7 +228,7 @@ (declaim (special ,var)) ,@(when valp `((unless (boundp ',var) - (setq ,var ,val)))) + (set ',var ,val)))) ,@(when docp `((setf (fdocumentation ',var 'variable) ',doc ))) ',var)) @@ -242,7 +242,7 @@ string for the parameter." `(progn (declaim (special ,var)) - (setq ,var ,val) + (set ',var ,val) ,@(when docp `((setf (fdocumentation ',var 'variable) ',doc))) ',var)) diff --git a/tests/eval.impure.lisp b/tests/eval.impure.lisp index f7803ff..d0f768b 100644 --- a/tests/eval.impure.lisp +++ b/tests/eval.impure.lisp @@ -97,6 +97,15 @@ (assert (constantp (find-class 'symbol))) (assert (constantp #p"")) + +;;; DEFPARAMETER must assign a dynamic variable +(let ((var (gensym))) + (assert (equal (eval `(list (let ((,var 1)) + (defparameter ,var 2) + ,var) + ,var)) + '(1 2)))) + ;;; success (sb-ext:quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 667dfce..b9dcdab 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.13.24" +"0.7.13.25"