Mercurial > hg > xemacs-beta
comparison lisp/cl-macs.el @ 5501:4813ff11c6e2
Correct the definition of #'cl-non-fixnum-number-p on 32-bit machines.
2011-05-06 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (most-positive-fixnum-on-32-bit-machines):
Correct this, I had an off-by-one error (because I was developing
on a 64-bit machine). Thanks for the report, Raymond Toy!
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 06 May 2011 10:37:14 +0100 |
parents | f2881cb841b4 |
children | 9ac0016d8fe8 |
comparison
equal
deleted
inserted
replaced
5500:01900734203a | 5501:4813ff11c6e2 |
---|---|
3225 ;; will not be represented as fixnums if the byte-compiled code is read by | 3225 ;; will not be represented as fixnums if the byte-compiled code is read by |
3226 ;; the Lisp reader in a 32-bit build. So in that case we need to check the | 3226 ;; the Lisp reader in a 32-bit build. So in that case we need to check the |
3227 ;; range of fixnums as well as their types. XEmacs doesn't support machines | 3227 ;; range of fixnums as well as their types. XEmacs doesn't support machines |
3228 ;; with word size less than 32, so it's OK to have that as the minimum. | 3228 ;; with word size less than 32, so it's OK to have that as the minimum. |
3229 (macrolet | 3229 (macrolet |
3230 ((most-negative-fixnum-on-32-bit-machines () (lognot (1- (lsh 1 30)))) | 3230 ((most-positive-fixnum-on-32-bit-machines () (1- (lsh 1 30))) |
3231 (most-positive-fixnum-on-32-bit-machines () (lsh 1 30))) | 3231 (most-negative-fixnum-on-32-bit-machines () |
3232 (lognot (most-positive-fixnum-on-32-bit-machines)))) | |
3232 (defun cl-non-fixnum-number-p (object) | 3233 (defun cl-non-fixnum-number-p (object) |
3233 "Return t if OBJECT is a number not guaranteed to be immediate." | 3234 "Return t if OBJECT is a number not guaranteed to be immediate." |
3234 (and (numberp object) | 3235 (and (numberp object) |
3235 (or (not (fixnump object)) | 3236 (or (not (fixnump object)) |
3236 (not (<= (most-negative-fixnum-on-32-bit-machines) | 3237 (not (<= (most-negative-fixnum-on-32-bit-machines) |