From: Joe Marshall
Subject: Re: Blowfish, and a question about DEFCONSTANT
Date:
Message-ID: <eks8525i.fsf@comcast.net>
Alain Picard <············@memetrics.com> writes:
> I have a question, however, either about the behaviour
> of DEFCONSTANT, or that of SBCL.
>
> When loading blowfish into SBCL, I get the following
> error:
> | The constant BLOWFISH::+INITIAL-P-ARRAY+ is being redefined (from
> | #(608135816 2242054355 320440878 57701188 2752067618 698298832 137296536
> | 3964562569 1160258022 953160567 3193202383 887688300 3232508343 3380367581
> | 1065670069 3041331479 2450970073 2306472731)
> | to
> | #(608135816 2242054355 320440878 57701188 2752067618 698298832 137296536
> | 3964562569 1160258022 953160567 3193202383 887688300 3232508343 3380367581
> | 1065670069 3041331479 2450970073 2306472731))
> | [Condition of type DEFCONSTANT-UNEQL]
> |
> | Restarts:
> | 0: [CONTINUE] Go ahead and change the value.
> | 1: [ABORT] Keep the old value.
> | 2: [ABORT] Return to SLIME toplevel.
> | 3: [ABORT] Reduce debugger level (leaving debugger, returning to toplevel).
> | 4: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
> |
I do this:
(defconstant +initial-p-array+
(if (boundp '+initial-p-array+)
(symbol-value '+initial-p-array+)
(make-array 18
:element-type '(unsigned-byte 32)
:initial-contents '(608135816 2242054355 320440878 57701188
2752067618 698298832 137296536 3964562569
1160258022 953160567 3193202383 887688300
3232508343 3380367581 1065670069 3041331479
2450970073 2306472731))))
For some reason using +foo+ in the conditional causes problems in
lispworks, but (symbol-value '+foo+) works.
--
~jrm