1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-15 08:10:17 +02:00

* srfi/srfi-1.c (srfi1_ilength), libguile/list.c (scm_ilength,

scm_last_pair), libguile/unif.c (l2ra): Prefer !SCM_CONSP over
	SCM_NCONSP.

	* libguile/unif.c (l2ra): Eliminate redundant check.

	Now, guile itself does not include any calls to SCM_NCONSP any
	more.
This commit is contained in:
Dirk Herrmann 2003-04-21 01:59:57 +00:00
parent 9ff1720f85
commit 1685446c0d
5 changed files with 22 additions and 8 deletions

View file

@ -38,11 +38,11 @@ srfi1_ilength (SCM sx)
do {
if (SCM_NULL_OR_NIL_P(hare)) return i;
if (SCM_NCONSP(hare)) return -2;
if (!SCM_CONSP (hare)) return -2;
hare = SCM_CDR(hare);
i++;
if (SCM_NULL_OR_NIL_P(hare)) return i;
if (SCM_NCONSP(hare)) return -2;
if (!SCM_CONSP (hare)) return -2;
hare = SCM_CDR(hare);
i++;
/* For every two steps the hare takes, the tortoise takes one. */