diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-21 11:40:23 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-08-21 11:41:54 -0700 |
commit | 81e7eef8224c8a99a207b7a7b9dae1d598392ef7 (patch) | |
tree | 1404996c717b76961b02c6a238242d63afc23660 /src/lisp.h | |
parent | ad31afc35be2c64863a03b8f3995847332870cb6 (diff) | |
download | emacs-81e7eef8224c8a99a207b7a7b9dae1d598392ef7.tar.gz emacs-81e7eef8224c8a99a207b7a7b9dae1d598392ef7.tar.bz2 emacs-81e7eef8224c8a99a207b7a7b9dae1d598392ef7.zip |
Fix bignum bugs with nth, elt, =
* src/bytecode.c (exec_byte_code): Support bignums
when implementing nth, elt, and =.
* src/lisp.h (SMALL_LIST_LEN_MAX): New constant.
* src/fns.c (Fnthcdr): Use it.
(Felt): Do not reject bignum indexes.
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 8f48a334844..c5593b21008 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4694,6 +4694,11 @@ enum Lisp_String)) \ : make_unibyte_string (str, len)) +/* The maximum length of "small" lists, as a heuristic. These lists + are so short that code need not check for cycles or quits while + traversing. */ +enum { SMALL_LIST_LEN_MAX = 127 }; + /* Loop over conses of the list TAIL, signaling if a cycle is found, and possibly quitting after each loop iteration. In the loop body, set TAIL to the current cons. If the loop exits normally, |