core: formal_p: Prepare for M2-Planet.

* src/eval-apply.c (formal_p): Prepare for M2-Planet.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-07-16 19:39:34 +02:00
parent 7a2f85b34b
commit 065b026bfc
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -213,8 +213,12 @@ formal_p (SCM x, SCM formals) /*:((internal)) */
else else
return 0; return 0;
} }
while (TYPE (formals) == TPAIR && CAR (formals) != x) while (TYPE (formals) == TPAIR)
{
if (CAR (formals) == x)
break;
formals = CDR (formals); formals = CDR (formals);
}
if (TYPE (formals) == TSYMBOL) if (TYPE (formals) == TSYMBOL)
return formals == x; return formals == x;
return TYPE (formals) == TPAIR; return TYPE (formals) == TPAIR;