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:
parent
89f886122a
commit
0f75cc7809
1 changed files with 4 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue