1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

simplify narrow_stack.

* libguile/stacks.c (narrow_stack): Simplify outer narrowing by a number
  of frames.  Thanks to
  http://article.gmane.org/gmane.lisp.guile.devel/12685.
This commit is contained in:
Andy Wingo 2011-07-29 09:17:47 +02:00
parent 89f886122a
commit 0f75cc7809

View file

@ -184,11 +184,10 @@ narrow_stack (SCM stack, long inner, SCM inner_key, long outer, SCM outer_key)
else
{
/* Cut specified number of frames. */
for (; outer && len ; --outer)
{
frame = scm_stack_ref (stack, scm_from_long (len - 1));
len--;
}
if (outer < len)
len -= outer;
else
len = 0;
}
SCM_SET_STACK_LENGTH (stack, len);