Mercurial > emacs
diff src/fns.c @ 26256:144cf26f35e1
(Flength): Unroll loop over lists.
| author | Gerd Moellmann <gerd@gnu.org> |
|---|---|
| date | Sun, 31 Oct 1999 02:01:59 +0000 |
| parents | d44efc0b3243 |
| children | f908261703d3 |
line wrap: on
line diff
--- a/src/fns.c Sun Oct 31 02:01:25 1999 +0000 +++ b/src/fns.c Sun Oct 31 02:01:59 1999 +0000 @@ -148,11 +148,18 @@ XSETFASTINT (val, XVECTOR (sequence)->size & PSEUDOVECTOR_SIZE_MASK); else if (CONSP (sequence)) { - for (i = 0; CONSP (sequence); ++i) + i = 0; + while (CONSP (sequence)) { - if ((i & 0xff) == 0) - QUIT; sequence = XCDR (sequence); + ++i; + + if (!CONSP (sequence)) + break; + + sequence = XCDR (sequence); + ++i; + QUIT; } if (!NILP (sequence))
