summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/derived.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-01-10 21:35:31 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-01-10 21:39:56 -0800
commit470082de55f7b1c1cde8aabbb5b8de55b4b08f83 (patch)
tree73f67a8951cdeb998a822fd38a6abd242b16199a /lisp/emacs-lisp/derived.el
parent9609db9d98babfe8782a03aebe46176e57905c63 (diff)
downloademacs-470082de55f7b1c1cde8aabbb5b8de55b4b08f83.tar.gz
emacs-470082de55f7b1c1cde8aabbb5b8de55b4b08f83.tar.bz2
emacs-470082de55f7b1c1cde8aabbb5b8de55b4b08f83.zip
List lengths are always fixnums now
Without this patch, it was theoretically possible for a list length to be a bignum, which means that safe-length could signal an error (due to generating a too-large bignum) contrary to its documentation. Fix things to remove the theoretical possibility, so that list lengths are always fixnums (and so that list lenghts are always ptrdiff_t values too, since that is assumed internally anyway). * src/alloc.c (Fcons): Do not allocate so many conses that a list length won’t fit into ptrdiff_t or into fixnum. This matters only on weird platforms; on typical platforms, list lengths always fit anyway. * src/fns.c (list_length, Fsafe_length, proper-list-p): Remove integer overflow checks that are no longer needed.
Diffstat (limited to 'lisp/emacs-lisp/derived.el')
0 files changed, 0 insertions, 0 deletions