diff options
author | Andy Wingo <wingo@pobox.com> | 2014-04-14 15:14:26 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-04-14 15:14:26 +0200 |
commit | 8de051da47e8f0f56a13bde6a4b37ece5f9c81cf (patch) | |
tree | eb2245418fce972f4e0cec507d6aa00b48ce5f13 /libguile/stacks.c | |
parent | 44d9705464d8f54111ed8a8a90d76f0c774e7184 (diff) | |
download | guile-8de051da47e8f0f56a13bde6a4b37ece5f9c81cf.tar.gz |
scm_c_make_frame takes struct scm_frame as arg
* libguile/frames.h:
* libguile/frames.c (scm_c_make_frame): Adapt to take a const struct
scm_frame as the argument. Adapt callers.
* libguile/continuations.c:
* libguile/stacks.c: Adapt callers.
Diffstat (limited to 'libguile/stacks.c')
-rw-r--r-- | libguile/stacks.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libguile/stacks.c b/libguile/stacks.c index 360b35f7b..8837a7fe2 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -1,5 +1,5 @@ /* A stack holds a frame chain - * Copyright (C) 1996,1997,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation + * Copyright (C) 1996,1997,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -254,14 +254,16 @@ SCM_DEFINE (scm_make_stack, "make-stack", 1, 0, 1, { SCM cont; struct scm_vm_cont *c; + struct scm_frame tmp; cont = scm_i_capture_current_stack (); - c = SCM_VM_CONT_DATA (cont); - frame = scm_c_make_frame (SCM_VM_FRAME_KIND_CONT, c, - (c->fp + c->reloc) - c->stack_base, - (c->sp + c->reloc) - c->stack_base, - c->ra); + c = SCM_VM_CONT_DATA (cont); + tmp.stack_holder = c; + tmp.fp_offset = (c->fp + c->reloc) - c->stack_base; + tmp.sp_offset = (c->sp + c->reloc) - c->stack_base; + tmp.ip = c->ra; + frame = scm_c_make_frame (SCM_VM_FRAME_KIND_CONT, &tmp); } else if (SCM_VM_FRAME_P (obj)) frame = obj; |