Dumping bignums
Jerry James
james at xemacs.org
Thu Apr 15 18:59:51 EDT 2004
It's about time we changed that subject line, isn't it? :-)
Olivier Galibert <galibert at pobox.com> wrote:
> (* 1000 1000 1000 1000)
> 1000000000000
>
> Ok, looks like I have a functional bignum-enabled xemacs. I've never
> really looked at the lisp half of dumping any more than I needed to
> though, so do you have an easy way to make xemacs try to dump such a
> number (and fail, of course)?
Yes. Undo my last change to cl.el. The old definition of
cl-random-time involves a bunch of multiplications that used to just
overflow and produce a valid fixnum. Now I have to truncate it back to
a fixnum because of the dumping problem. In short, replace
(defun cl-random-time ()
(let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
(while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i))))
(if (featurep 'number-types)
(coerce-number v 'fixnum)
v)))
with
(defun cl-random-time ()
(let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
(while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i))))
v))
--
Jerry James
http://www.ittc.ku.edu/~james/
More information about the XEmacs-Beta
mailing list