diff options
| author | Paul Eggert | 2018-08-21 11:40:23 -0700 |
|---|---|---|
| committer | Paul Eggert | 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.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 | |||
| 4694 | Lisp_String)) \ | 4694 | Lisp_String)) \ |
| 4695 | : make_unibyte_string (str, len)) | 4695 | : make_unibyte_string (str, len)) |
| 4696 | 4696 | ||
| 4697 | /* The maximum length of "small" lists, as a heuristic. These lists | ||
| 4698 | are so short that code need not check for cycles or quits while | ||
| 4699 | traversing. */ | ||
| 4700 | enum { SMALL_LIST_LEN_MAX = 127 }; | ||
| 4701 | |||
| 4697 | /* Loop over conses of the list TAIL, signaling if a cycle is found, | 4702 | /* Loop over conses of the list TAIL, signaling if a cycle is found, |
| 4698 | and possibly quitting after each loop iteration. In the loop body, | 4703 | and possibly quitting after each loop iteration. In the loop body, |
| 4699 | set TAIL to the current cons. If the loop exits normally, | 4704 | set TAIL to the current cons. If the loop exits normally, |