Skip to content
Snippets Groups Projects
Commit 0002e828 authored by csr21's avatar csr21
Browse files

Might as well be hanged for a sheep as for a lamb... more unportable

Might as well be hanged for a sheep as for a lamb... more unportable
defconstantage

darcs-hash:20030606100154-ed5a3-b013dd33fee5e61d15665c54f52e66e6362644b4.gz
parent 128cfa08
No related branches found
No related tags found
No related merge requests found
......@@ -77,13 +77,25 @@
#+sbcl
(defmethod perform :around (o (f clx-source-file))
;; SBCL signals an error if DEFCONSTANT is asked to redefine a
;; constant unEQLly. For CLX's purposes, however, we are defining
;; structured constants (lists and arrays) not for EQLity, but for
;; the purposes of constant-folding operations such as (MEMBER FOO
;; +BAR+), so it is safe to abort the redefinition provided the
;; structured data is sufficiently equal.
(handler-bind
((sb-ext:defconstant-uneql
(lambda (c)
;; this really means "don't warn be about efficiency of
;; generic array access, please"
(declare (optimize (sb-ext:inhibit-warnings 3)))
(let ((old (sb-ext:defconstant-uneql-old-value c))
(new (sb-ext:defconstant-uneql-new-value c)))
(typecase old
(list (when (equal old new) (abort c)))
(string (when (and (typep new 'string)
(string= old new))
(abort c)))
(simple-vector
(when (and (typep new 'simple-vector)
(= (length old) (length new))
......
......@@ -691,7 +691,7 @@
;;; particular, the different float approximations will always be /=. This
;;; causes problems with type checking, because people might compute an
;;; argument in any precision. What we do is discard all the excess precision
;;; in the value, and see if the protocal encoding falls in the desired range
;;; in the value, and see if the protocol encoding falls in the desired range
;;; (64'ths of a degree.)
;;;
(deftype angle () '(satisfies anglep))
......@@ -1480,7 +1480,7 @@
:foreign-port (+ *x-tcp-port* display)))
#+sbcl
(defparameter +X-unix-socket-path+
(defconstant +X-unix-socket-path+
"/tmp/.X11-unix/X"
"The location of the X socket")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment